Comments (8)
@oliviaflory Some general Figma thoughts —
- We currently have our beta component library, but it's not being actively maintained right now. Those v1 component specs that the team has been working on are a closer source of truth. IMO, our update to CIBM v2 should be when we target heavier work on the AEM component library.
- I think it may be useful in the specs we're maintaining to add notes when we're relying on a part attribute
- I don't think we'd necessarily document on a docs component page where we're applying this attribute (can include this in specs as noted above), but I am thinking that this should be included on a "how to create components" page, where we also call out some steps on governing this usage
from carbon-for-ibm-dotcom.
@andy-blum followup question: would you want to apply this to C4IBM v1 because that's what AEM is currently on? Or were you thinking this would be applied to C4IBM v2 so when AEM does adopt (possibly soon?) it will enable this greater flexibility?
from carbon-for-ibm-dotcom.
Oh that's a great question. Let me find out when we plan on upgrading to v2.
from carbon-for-ibm-dotcom.
Sounds like updating to v2 is slated for mid-late Q2. We'd probably want to do some of this in v1 (the cta-block, for example is a current pain point), but we could probably limit how much we add in to v1.
from carbon-for-ibm-dotcom.
Here's another demo, this time modifying cds-card
to reduce it to a single web component (no special eyebrow, heading, footer components) as well as allowing CSS authors to override component internal styles.
An important thing to remember if we do this is how context plays into the CSS Cascade:
Styles encapsulated within the component that conflict with global styles are resolved at the context level. The order, specificity, and @layer
of styles are all irrelevant. Styles encapsulated within the shadowRoot will lose to global styles, unless they are given the !important
tag, at which point the global styles cannot win. Therefore, it is critical to not use !important
tags except for cases where we are certain the styles must be present.
In my demo, I've applied !important
tags to the rules around focus rings, but we could just as easily use this as a way to enforce specific styles deemed "critical" for enforcing the IDL. Personally, that's not the way I'd choose to go, but it's an option available to us.
from carbon-for-ibm-dotcom.
@andy-blum thank you for your patience: Yes, let's move forward with the part
attribute!
Versions
I assume you will apply this to C4IBM v1
because AEM is currently on that version
Q: Do you plan to apply the part
attribute to ALL of the components, or a select number in v1 as needs arise?
- If you plan a select number then please let us know which ones
- What is the process for determining which components receive the part attributes
Documentation:
- We would love for you to document how you are applying the
part
attribute to the components- TBD on where we will surface the docs
- We will probably want to add some sort of warning to the part docs: ie just because you can, doesn't mean you should
- Q: How to communicate this to designers
Figma & design tooling
- At this time we will not be adding the component variants AEM creates to our Figma kit. Some considerations for your teams cc: @areagan1030
- The parts will have to be overriden or broken from our Figma kit. Breaking loses any updates
- How will your team document what variants designers and the CSS authors create or have created
- Do you have a figma kit of your own that AEM designers use?
- Will you surface the variants on the AEM doc site and explain when/how to use the variants
from carbon-for-ibm-dotcom.
I assume you will apply this to C4IBM v1 because AEM is currently on that version
Actually, I don't think we want to invest the time in doing this for v1 components. From what I've been told, AEM is looking at an upgrade to v2 near end of Q2. Personally, I'd like to avoid enabling AEM to stick around on an old version longer than needed. If this kind of flexibility motivates the powers that be to upgrade to v2, so be it.
We would love for you to document how you are applying the part attribute to the components.
- TBD on where we will surface the docs
There seems to be a way to do this already in the @storybook/addon-docs
plugin. We can see "CSS Shadow Parts" in the props table on the CAEM accordion item. We recently did an overhaul of our docs for CAEM components and noticed that was there but no other parts were appearing. @jkaeser might have more insight here.
![Screenshot 2024-04-09 at 9 52 23 AM](https://private-user-images.githubusercontent.com/25532785/320875690-a1691860-c8f8-45b3-935e-a0e2ff0e8f1a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY4OTI1NTcsIm5iZiI6MTcxNjg5MjI1NywicGF0aCI6Ii8yNTUzMjc4NS8zMjA4NzU2OTAtYTE2OTE4NjAtYzhmOC00NWIzLTkzNWUtYTBlMmZmMGU4ZjFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTI4VDEwMzA1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1MzQ5MTFmNTllZGYwOGJkNDI3ZmRlOWUyYTZmOGI3ZWUxZDFiMWE4ZTg0YTY5NDNmOGRjZjljNmQ2YmZiZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EB_fNkTf54zdPKLzfI9HJJtkkHWF0PIT_MZw3ocS8JY)
We will probably want to add some sort of warning to the part docs: ie just because you can, doesn't mean you should
Q: How to communicate this to designers
Agreed, though I don't have a thought yet on the right wording for this.
How will your team document what variants designers and the CSS authors create or have created
I'm not sure this is necessary? The modifications are all controlled by code, and content authors won't be able to make design decisions that aren't explicitly given to them by developers.
from carbon-for-ibm-dotcom.
Probably worth pointing out that there are already multiple places that v1
is using shadow parts
![Screenshot 2024-04-09 at 10 15 42 AM](https://private-user-images.githubusercontent.com/25532785/320880698-e201e103-7618-46a7-802a-664282acd6ac.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY4OTI1NTcsIm5iZiI6MTcxNjg5MjI1NywicGF0aCI6Ii8yNTUzMjc4NS8zMjA4ODA2OTgtZTIwMWUxMDMtNzYxOC00NmE3LTgwMmEtNjY0MjgyYWNkNmFjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTI4VDEwMzA1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ0Y2YzYzFlMTQwOTc2YzE5OGExMmFlMjQ0YjVmZjczNzYwYWM2MDdlYmVjNDFjMTQwMWZjYTllYmVlMGE1MTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.b8WTfz5XSqRrRh9BTK4gIEI7tL6idHXUGBDi0yHDt94)
![Screenshot 2024-04-09 at 10 15 25 AM](https://private-user-images.githubusercontent.com/25532785/320880693-3aab7799-bde3-4d01-b1b1-35e4eeb8b44d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY4OTI1NTcsIm5iZiI6MTcxNjg5MjI1NywicGF0aCI6Ii8yNTUzMjc4NS8zMjA4ODA2OTMtM2FhYjc3OTktYmRlMy00ZDAxLWIxYjEtMzVlNGVlYjhiNDRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTI4VDEwMzA1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM1ZDcyODc3YTAyOTcyM2ZkNTNjMjk4MjE2ZWQ2MGU2MmY1NWZiNjJmYzIwMzkwMjJhZjFjMzRkMGIxZTg5YTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OqAlDtZGI1ze6QvgfA25N-J62LWj5vwOqWrSpnHGwVI)
from carbon-for-ibm-dotcom.
Related Issues (20)
- The placeholder property for number input not working HOT 1
- carbon-web-component: can not enter negative value to number-input
- Greater text control for double byte languages HOT 5
- Alignment of checkboxes in data table with selection misaligned in Firefox
- Multiselect web component has unwanted pseudo component ::after
- [parent-visibility-mixin]: dds-video imports dds-tab component
- [cta-block]: Add CSS Shadow Part
- [card-group]: Borders / padding is LTR specific for the dds-card-group component
- Integrity attribute for CDN scripts
- [carbon-web-component]: cds-text-input styling/slots HOT 1
- [carbon-web-component]: cds-button styling
- [web-components]: card link icons have extra space to the right on RTL pages (v1) HOT 1
- [quote]: Quote marks positioned incorrectly in RTL, some quote marks need to be inverted
- [Masthead]: Megamenu positioned incorrectly when global banner is present
- Inconsistencies between Figma kit and Web Components HOT 2
- [DROPDOWN OVERFLOW TEXT TOOLTIP WEB-COMPONENTS]: when the text is too long in web-component dropdown item it goes overflow with ...
- V1 Overflow Menu doesn't close automatically
- TearSheet does not display in Angular project
- [combo-box / dropdown accessibility]: options are not read aloud HOT 1
- [web-components] Issue with typings makes several components unusable HOT 1
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 carbon-for-ibm-dotcom.