Closed chriseppstein closed 4 years ago
One more item to add to the TODO list: Make the word block
a reserved word (if it's not already... I don't think it is).
Because you reference the "default" exported block as block
, the compiler should throw if you try to @export (whatever as block ) from "wherever.block.css"
.
Alt: You can just change the keyword default
to block
for the import/export parser.
This may be confusing for those coming from JavaScript world though – would not recommend.
RFC: https://github.com/linkedin/css-blocks/issues/332
CSS Changes
class
in the namespace of the block. (conceptual change, not requiring any stylesheet parsing changes at this time).state|
namespace in the state attribute selector is no longer needed.:scope
selector will select an element with the attribute ofscope
that is in the namespace of the block.html
,svg
, andmath
and making them forbidden names for blocks.Handlebars Template Syntax Changes
block
.block:scope
then it is automatically assigned to the template's root element.class="foo other-block.bar"
we would now writeblock:class="foo" other-block:class="bar"
.class
attribute in html namespace is forbidden. (Later we can add configuration to allow it.)Documentation Changes