-
Notifications
You must be signed in to change notification settings - Fork 0
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
gulp, and select style #2
base: main
Are you sure you want to change the base?
Conversation
select[disabled] ~ label, | ||
textarea[disabled] ~ label { | ||
color: var(--muted-text); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see this is (mostly) duplicate of the stuff in form.shared-is-test.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have the duplicates?
margin: 0; /* 2 */ | ||
} | ||
|
||
/* Change the inconsistent appearance in IE (opinionated) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely let's make it all consistent!
src/utils/utils.css
Outdated
button, | ||
summary { | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another duplicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this one, thanks
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.