-
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
CSS Modules #29
Comments
Thank you for proposing a session! You may update the session description as needed and at any time before the meeting, but please keep in mind that tooling relies on issue formatting: follow the instructions and leave all headings and other formatting intact in particular. Bots and W3C meeting organizers may also update the description, to fix formatting issues or add links and other relevant information. Please do not revert these changes. Feel free to use comments to raise questions. Do not expect formal approval; W3C meeting organizers endeavor to schedule all proposed sessions that are in scope for a breakout. Actual scheduling should take place shortly before the meeting. |
Hi @rniwa, thanks for proposing these sessions. There is no need to say "avoid conflicts" with other sessions proposed by the same person. We take that into account automatically. (I will update our template to make that clearer.) |
Hi @rniwa Just wanted to get some thoughts on this session's description and goal (I'm part of the WCCG)
To my knowledge, CSS Module Scripts are already accepted as a web standard, building on top of Import Attributes and already implemented in Chrome, and having positive positions from both Webkit and Firefox. I was wondering if this session could have two goals?
I think advancing CSS Module Scripts would be an extremely valuable addition to the platform across all browsers, as managing CSS otherwise is often a pain point, often requiring some sort of build tooling to inline CSS into With CSS Module Scripts, at least for first party code, developers would have a standards compatible way to not only import CSS into their Web Components, but also to share styles across the Shadow and Light DOM. I made a little demo repo you can check out if it helps, hosted here, which basically showcases a custom element importing a global "theme.css" in addition to its own component styles, highlighting the style sharing opportunities between light and shadow DOM. import themeSheet from './theme.css' with { type: 'css' };
import componentSheet from './component.css' with { type: 'css' };
const template = document.createElement('template');
template.innerHTML = `
<h2>This should be blue and centered (theme.css)</h2>
<h3>This should be red and centered (component.css)</h3>
`;
export default class SomeComponent extends HTMLElement {
connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
this.shadowRoot.adoptedStyleSheets = [themeSheet, componentSheet];
}
}
customElements.define('some-component', SomeComponent); Hope this can be a consideration for all browser vendors! ✌️ |
Expand for the minutes of the Sept 25 TPAC breakout sessionrniwa set the topic: "CSS Modules" 3:12 PM 3:36 PM |
Session description
Session to discuss CSS modules and how they work with declarative shadow DOM:
https://github.com/WICG/webcomponents/blob/gh-pages/proposals/css-modules-v1-explainer.md
Session goal
Concrete proposal for CSS Module MVP
Additional session chairs (Optional)
No response
Who can attend
Anyone may attend (Default)
IRC channel (Optional)
#webcomponents
Other sessions where we should avoid scheduling conflicts (Optional)
No response
Instructions for meeting planners (Optional)
No response
Agenda for the meeting.
No response
Links to calendar
Meeting materials
The text was updated successfully, but these errors were encountered: