Open renestalder opened 3 years ago
You‘re right, ./source/css/pattern-scaffolding.css
is loaded into the iframe and thatfor you‘re able to control the states (which are displayed as dots in there as well), but not within the left or top Patternlab menubar of the navigation.
I think we would need a similar possibility to easily tweak styles for that section / the UIKit as well. I think to remember some initiative on that, will have a look and come back to this.
Alright. Thanks for the confirmation.
I sadly haven't found anything during a quick research – so we should probably suggest a mechanism of how to add stylesheets (or probably HTML tags to the <head>
in general, maybe this is another good use case) to the outer frame.
@renestalder I've release a fork of the https://www.npmjs.com/package/plugin-node-uiextension plugin: https://www.npmjs.com/package/@mfranzke/plugin-node-uiextension
This brings pattern lab 5 support and enables you as well to provide a stylesheet URL that would get embedded to the Pattern lab UI. That should solve your problem, by being able to add those individual stylesheets to that general UI now.
The documentation for pattern states says, it is possible to add the custom styles for newly added states to
./source/css/pattern-scaffolding.css
.But is this actually true? Is the
pattern-scaffolding.css
able to overwrite styles in the Pattern Lab UIKit? I believe this is a mistake as to my knowledge, thepattern-scaffolding.css
is only loaded via the_head
file inside the iFrame of the rendered patterns and doesn't have access to the outside context.Or I simply misunderstand the documentation.