Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes styles in the style guide hot reloadable #19

Merged
merged 2 commits into from Oct 24, 2017

Conversation

pugnascotia
Copy link
Contributor

The docs site now pulls in the light and dark themes directly, which means they can hot-load changes. To make this work, I had to inline a SVG file in checkbox.scss, which I've done with a PostCSS plugin. This also has the benefit of fixing an issue with the distributable styles.

Copy link
Contributor

@bevacqua bevacqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this for now, we can always iterate.

mask: url('../src/components/icon/assets/check.svg') center center no-repeat;
// This path is relative to ~/docs/postcss.config.js, which uses
// the postcss-line-svg plugin.
mask: svg-load('../src/components/icon/assets/check.svg') center center no-repeat;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds super hacky to me. My brain immediately goes "why does src need to know about something docs is doing". Should the postcss configuration live in src instead?

@pugnascotia pugnascotia merged commit 53d6577 into master Oct 24, 2017
@pugnascotia pugnascotia deleted the hot-load-styles-in-docs branch October 24, 2017 14:13
@pugnascotia
Copy link
Contributor Author

Raised #23 to cover moving the config.

@snide
Copy link
Contributor

snide commented Oct 24, 2017

Woot!

cee-chen pushed a commit to cee-chen/eui that referenced this pull request Nov 5, 2021
…es-examples

Miukimiu writing guidelines examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants