You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should add the text content of <style> to the contents of the document:
document.contents.add('css','\n a { color: blue; }\n')
Preprocessors
<styletype="scss">
a { color: lighten(blue, 10%); }
</style>
Should add the text content of <style> to the SCSS contents of the document:
document.contents.add('scss','\n a { color: lighten(blue, 10%); }\n')
The same must work for sass and less. Tbd: There should be a list of valid types which can be extended via plugin. If the type is not defined, it should raise an error.
Scoping
Often it is useful to add additional CSS to make an example look good in a style guide. A notification might have position: absolute but within the example it needs to be changed to position: relative. This change must not apply globally as the notification might be used outside of examples.
This could be solved by adding a class/ID to the code block and a scope to the <style>:
New feature
Allow page/code block-specific CSS.
Specification
Should add the text content of
<style>
to thecontents
of the document:Preprocessors
Should add the text content of
<style>
to the SCSScontents
of the document:The same must work for
sass
andless
. Tbd: There should be a list of valid types which can be extended via plugin. If the type is not defined, it should raise an error.Scoping
Often it is useful to add additional CSS to make an example look good in a style guide. A notification might have
position: absolute
but within the example it needs to be changed toposition: relative
. This change must not apply globally as the notification might be used outside of examples.This could be solved by adding a class/ID to the code block and a
scope
to the<style>
:That might be a bit too much to type. This should get a shortcut:
Tbd.
previous-element
is just a first idea and needs to be discussed. It could be used elsewhere:This requires automatically generated IDs (#26).
The text was updated successfully, but these errors were encountered: