
Show HN: Deterministic Style Sheets - ggurgone
https://twitter.com/giuseppegurgone/status/1017787578194583552
======
gitgud
What does deterministic style sheet mean?

Can you show a side by side example showing the difference between plain old
CSS Style Sheets and deterministic Style Sheets

~~~
ggurgone
deterministic as that when you apply class names to your templates you get
deterministic resolution eg:

class="red green" makes your element green class="green red" makes your
element red

i.e. there is no cascade anymore but classes are applied in the order they're
used.

DSS is pretty much like CSS, the only constraint is that it must be compilable
to atomic CSS classes so there are a few restrictions [https://dss-
lang.com/supported-css-features/](https://dss-lang.com/supported-css-
features/)

As for an example you can take a look at the source code of the components
that make the website:
[https://github.com/giuseppeg/dss/tree/master/website/compone...](https://github.com/giuseppeg/dss/tree/master/website/components)

