Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Use a base set of CSS variables across PureScript resources #147

Open
thomashoneyman opened this issue Sep 21, 2020 · 1 comment

Comments

@thomashoneyman
Copy link
Member

thomashoneyman commented Sep 21, 2020

CSS variables have 95% support on caniuse.com. These variables are particularly useful for theming: a set of variables representing colors, fonts, font sizes, spacing units, and more can be used when styling HTML elements; changing the value of a variable will update values throughout the CSS.

What if we had a set of CSS variables representing the PureScript theme or brand? We could use these variables to implement the CSS across PureScript resources (the homepage, Try PureScript, Pursuit, and so on) and it could be reused by other resources that want to look PureScript-y, like Halogen Storybook or other documentation sites.

Admittedly, the PureScript CSS doesn't change much. But it still seems useful to be able to rely on a consistent base of colors, fonts, sizing, and so on when working on any core PureScript resource or implementing third-party sites. It would also make it easy to support a light / dark theme on core resources if we ever want that.

@hdgarrood
Copy link
Collaborator

I would rather use a CSS preprocessor like Less. It’s very easy to compile to CSS and that way the colours will display correctly in all browsers. We do have this right now: it’s https://github.com/purescript/purescript/blob/master/app/static/pursuit.less

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants