styling of ui5 webcomponents
See original GitHub issueI would like to override some of the classes. e.g .sapWCSelect
As Chrome decided to remove support of shadow-dom css selectors and /deep/
and ::shadow
are not an option.
What would be the best way of styling an ui5-webcomponent?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Add Custom Styles and Components for UI5 Web ...
In this tutorial, you will learn how to apply styling to the UI5 Web Components. You can add custom styles and even overwrite...
Read more >Developing Custom UI5 Web Components - SAP
Developing Custom UI5 Web Components. Note: All examples in this tutorial are taken from the Demo UI5 Web Component ( ui5-demo ), generated...
Read more >Ui5 Webcomponents Theme Change - StackBlitz
A run-time theme change example for ui5-webcomponents. ... import '@ui5/webcomponents/dist/RadioButton'; ... document.body.style.backgroundColor = "#000";.
Read more >Why cant I customize the styling of web component libraries ...
Not the answer you're looking for? Browse other questions tagged. javascript · html · reactjs · web-component · ui5-webcomponents. or ask your ...
Read more >UI5 Web Components: Build Enterprise Ready UIs ... - YouTube
In this session we will explore the UI5 Web Components – the latest SAP UI Open Source offering. UI5 Web Components are lightweight...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @DamianLion
For now you can use the
addCustomCSS
as:from v
0.10.0
we will change the base imports by removing/sap/ui/webcomponents/base/
0.9.0
"@ui5/webcomponents-base/src/sap/ui/webcomponents/base/theming/CustomStyle"
0.10.0
"@ui5/webcomponents-base/src/theming/CustomStyle"
We are currently reworking the theming and we will provide a better overstyling for the future. I will keep this open as we have some more work to do.
Regards!
Hello all,
We did quite a lot of work in that direction:
Styling Root
Styling components using
CSS
on root - you can now style most of the components (for which it makes sense ofcourse) on root levele.g.
<ui5-input style="height: 200px; width: 10px; border: 1px solid blue"></ui5-input>
CSS Variables
We expose some `CSS custom properties for some parts of the components which make sense to have a public API
e.g.
--ui5-panel-background-color
of theui5-panel
CSS Shadow Parts
CSS Shadow parts is not yet implemented in all major browsers, but we believe that this is the right direction for styling
parts
of Shadow DOM. Therefore, we provide some of parts of our composite components as an API. e.g.ui5-card
-status
partWe are working on a polyfill until we got a full browser support on that feature. The polyfill is still in a review stage, but I believe it will be out for some testing and feedback very soon: https://github.com/SAP/ui5-webcomponents/pull/609
Global Theming
As all of our components are working with CSS Custom Variables we are also working in the direction of providing a way to make your own theme using a tool such as the
SAP Theme Designer
. So stay tuned!If you have any other feedback or proposals feel free to contact us!