dgp1130 / rules_prerender

A Bazel rule set for prerending HTML pages.
14 stars 0 forks source link

Default to inlined styles #47

Closed dgp1130 closed 2 years ago

dgp1130 commented 2 years ago

Currently prerender_component() and friends have styles and inline_styles attributes. The former refers to "global styles" applied to the whole page while the latter are inlined and usage and work well with declarative shadow DOM which is the primary component model. rules_prerender recommends using inlined styles wherever possible, so we should make inlined styles the default styles option, while using a separate global_styles option for styles intended to apply to the whole page. See discussion in #41.

Long term it would be great to drop global_styles altogether, but that's not necessarily in scope here.

dgp1130 commented 2 years ago

So I got a little overeager and just decided to delete global styles entirely. All the build rules are still named with inline_styles attributes, so I'd like to rename those now that the styles name is free.

dgp1130 commented 2 years ago

Ok, I've renamed inline_styles to styles everywhere I could find, we should be in a consistent state where all styles are inlined and global styles are just not a thing.