Conversation
| select[disabled] ~ label, | ||
| textarea[disabled] ~ label { | ||
| color: var(--muted-text); | ||
| } |
There was a problem hiding this comment.
This only works for
<input .../>
<label>...<label>We will also need
<label>...<label>
<input .../>and
<label>...<input .../><label>
<label><input .../>...<label>There was a problem hiding this comment.
Yeah, that was just a test. Thanks for the heads up
| input[type='file' i], | ||
| summary { | ||
| cursor: pointer; | ||
| } |
There was a problem hiding this comment.
I think it is still better to try to use multiple files, if possible. Wdyt? Is there a reason to put it in here?
There was a problem hiding this comment.
So the idea is whatever is shared, have it in the same file. If you want to change the cursor it easier than go through different files.
| input[type='reset' i], | ||
| input[type='file' i] { | ||
| cursor: pointer; | ||
| } |
There was a problem hiding this comment.
Oh, I see this is (mostly) duplicate of the stuff in form.shared-is-test.css
There was a problem hiding this comment.
Do we want to have the duplicates?
| margin: 0; /* 2 */ | ||
| } | ||
|
|
||
| /* Change the inconsistent appearance in IE (opinionated) */ |
There was a problem hiding this comment.
Definitely let's make it all consistent!
src/utils/utils.css
Outdated
| button, | ||
| summary { | ||
| cursor: pointer; | ||
| } |
|
It's such a problem organizing code in plain CSS! Random idea: What if we define certain entry points like -In the full build, we can use postcss to eliminate duplicate imports.
The downside is, if the user imports only parts, then they need to use different variable names for each part to ensure no collisions (f.e. Get what I mean? A bit bad though. Still thinking.... About the gulp stuff, what does it do? I see it tries to operate on |
|
@trusktr please check my last commits because I think it will answer my strategy for the variables and what Gulp does. Apologies for it because I didn't push the updates 😪 A recap: I've created a Gulpfile to extract the styles from shared files that are specific to the element. You can try and experiment to see how it works. I did a regex that works well with pseudo-classes so it should be ok but not sure if is bullet-proof. My idea is for each @import './shared/variables.css';
@import './shared/colors.css';
@import './utils/utils.css';
@import './elements/____ELEMENT___.css';As you can see it's the same as GulpUse
Next
@import './shared/variables.css';
@import './shared/colors.css';
@import './utils/utils.css';
@import './shared/____ELEMENT___.shared.css';
@import './elements/____ELEMENT___.css';Benefits
Note: the select element is not styled yet with the colours because I'd like to work on the variables first |
I see what you're saying. Wanna give it a try? I'm not sure I entirely see the full benefit yet. I mean, I think I see how the output may be, but also curious as to how it affects the dev experience. One thing is, if the user writes @import '/node_modules/@lume/basicss/dist/elements/select.css';
@import '/node_modules/@lume/basicss/dist/elements/input.css';then this will still result in all stuff from I wonder if there maybe we can make a |
|
@trusktr I guess since we're compiling with Gulp or PostCSS, we can create a file called:
Either way, I think it would be fun for me to try. |
|
deleted |
No description provided.