Skip to content

Distinguish C# and F# code in documentation #439

Open

Description

@hickford

An idea: it could be helpful to distinguish C# code from F# code in the documentation somehow, eg. by giving it a different background colour. This would make the documentation easier to read. I know both F# and C# but still find it confusing reading one when expecting another.

Example https://fscheck.github.io/FsCheck/Properties.html

Activity

  1. kurtschelfthout commented on May 26, 2018

    @kurtschelfthout
    Member

    Yes, this is a good idea. Do you know how to do it? We use Fsharp.formatting. Perhaps there is some css magic we can do?

  2. jzabroski commented on Jun 26, 2018

    @jzabroski
  3. changed the title [-]Distinguish C# and F# code in documentation by background colour[/-] [+]Distinguish C# and F# code in documentation[/+] on Jul 20, 2018
  4. Angr1st commented on Feb 18, 2019

    @Angr1st

    I would like to tackle this.

  5. kurtschelfthout commented on Feb 18, 2019

    @kurtschelfthout
    Member

    Nice! Do you need some pointers - I can only be of minimal help - I would start with digging through the generated html etc and figure out if there is some css we can leverage.

    FSharp.formatting does allow us to specify a template so maybe it’s possible to put something there.

  6. Angr1st commented on Feb 19, 2019

    @Angr1st

    I have already skimmed through the code and tried to find out how to alter the css to adapt the background color. It currently seems like we just use the default css that is delivered by Fsharp.Formatting. I have opened an issue with them for this as a feature as I think that there would be more people that would enjoy some clearer language snippet differentiation.

  7. kurtschelfthout commented on Feb 19, 2019

    @kurtschelfthout
    Member

    That's awesome.

    I noticed that the snippets are surrounded by <code lang="fsharp"></code> tags - any chance we can do something with that?

    Sorry if that's stupid or obvious, I know next to nothing about css etc :)

  8. Angr1st commented on Feb 21, 2019

    @Angr1st

    No worries my css knowledge is not that big but in theory we could but it would need to be done in fsharp.formatting itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions