Comments (4)
It looks like we already have https://github.com/postcss/postcss-custom-properties here, so this should be working, but I think it doesn't play well with the MiniCSSExtractPlugin
step, since only the file that defines the :root
is getting the fallbacks.
The easiest solution would be to pull all CSS back into one file, and only import that one file in JS, but I don't want to loose the component-level CSS 😕 Another option is to set up our own postcss config (wp-scripts
will use a local postcss.config.js
file) & re-define postcss-custom-properties
so that we can pass the custom properties in. I think this is the way to go here.
from pattern-directory.
I don't want to loose the component-level CSS
💯
I think it doesn't play well with the MiniCSSExtractPlugin step
Is that because of a bug, or just an incompatibility? If it's a bug, then another option would be to just file a report upstream. Unless this breaks functionality, I don't think we need to go out of our way for IE11 support.
from pattern-directory.
I didn't spend enough time in their repo to see if it's intentional, but I think it's just how webpack/postcss works. The custom properties plugin reads the variables from the CSS, but AFAICT postcss runs before the CSS is concat'd, so file-one.css
doesn't know the custom properties defined in file-two.css
. postcss-custom-properties
has a config option to pass in a set of property definitions so it doesn't need to read from the CSS, that's the fix I'm suggesting.
from pattern-directory.
Huh, it seems odd that it'd require a custom config, I imagine lots of other projects would want to do the same thing. Oh well, maybe wp-scripts just hasn't added support for that yet 🤷🏻♂️
In that case the custom config wfm.
from pattern-directory.
Related Issues (20)
- I am not able to replce media on existing image
- Error when clicking Preview in Pattern Maker Editor HOT 5
- Improvising Patterns Directory - Add option for patterns variations. HOT 3
- Pattern About Page Spacing - Mobile View HOT 1
- Remove reliance upon gutenberg_initialize_editor().
- The text within the select option (dropdown) is slightly truncate HOT 2
- The top right screen corner panel disappearing after switching preview mode in the pattern editor HOT 1
- Pattern editor font family differs from pattern preview
- Pattern editor content width issue HOT 2
- Add UI for blockType and postType
- Patterns categories terms translations rendering when there are apostrophes HOT 1
- Inconsistent categories within inspector and submission modal
- Proposal: Don't ship core patterns to WordPress sites in the "Featured" category
- Update categories on the pattern directory site
- Support viewport width
- Add support for creating patterns for templates, using template types
- Expose template types as categories
- Creator: Can't update cover block background image HOT 1
- Row item justification not displaying properly in Editor
- Welcome Guide: Button text hidden
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pattern-directory.