FSharp.Formatting icon indicating copy to clipboard operation
FSharp.Formatting copied to clipboard

Consider publishing a sass package for styling

Open kMutagene opened this issue 4 years ago • 4 comments

Publishing a sass package for the styling (and compiling the fsdocs-default.css file from it) would highly benefit the expandability of the package and make template generation easier. As this library is undergoing drastic changes in the last months (thats a good thing!), i had some difficulties keeping up with changes to the css file and reflecting/supporting those with the fslab documentation template. A sass file that a template could just pull and overwrite the default colors would be a blessing. I am not sure if that should be a seperate repository, and if adding npm and sass into the mix of this already complicated repository here is wanted.

A sass package would for example provide the colors for snippet highlighting:

$fsdocs-snippet-id: #d1d1d1
$fsdocs-snippet-if: #43AEC6
...

template maintainers then could import the sass file after defining replacements where needed:

$fsdocs-snippet-id: #ffffff
@import "fsdocs-sass-package"

-> $fsdocs-snippet-id is replaced, $fsdocs-snippet-if kept as-is

While most if this is achievable with the usage of fsdocs-default.css and fsdocs-custom.css, this would also decrease the size of the css package, as the template could omit the default file.

kMutagene avatar Apr 15 '21 19:04 kMutagene

poc here

kMutagene avatar Apr 15 '21 20:04 kMutagene

Sounds good. I'd love it if we could just simplify the CSS as well, so it looks good but there's nothing unnecessary in it

dsyme avatar Apr 16 '21 13:04 dsyme

https://fslab.org/docs-template/ looks great. We really do have to support .ipynb inputs as well, it would make it perfect

dsyme avatar Apr 16 '21 13:04 dsyme

@dsyme i think there is not much missing from POC i posted earlier, but to publish a npm package i need to know how we want to proceed in terms of the publishing account. I could upload the package on my own account, but it feels wrong to publish something as 'core' as this under a personal account. I have not enough knowledge about npm to be sure how to best handle this, but it seems like it has orgs: https://docs.npmjs.com/creating-an-organization. So maybe you would like to create one for fsprojects?

kMutagene avatar Jun 09 '21 07:06 kMutagene