Skip to content

How to reuse a CSS variable from WC in my app? #410

@Psidium

Description

@Psidium

Is your feature request related to a problem? Please describe.

In my mocks, the UI designer asked for a specific border around a table.

ui5-table only have borders on the top and bottom.

I'd like to reuse the ui5-table's border-bottom CSS property for my instance of ui5-table, but how can I get the exact color used while respecting the theming?.

Describe the solution you'd like

I would like to create a class like this (in my app):

.exchange-table {
    border: 1px solid var(--ui5-panel-bottom-border-color); /* any variable from WC */
    border-radius: .1em;
}

Describe alternatives you've considered

I could fetch the color after the table has rendered via getComputedProperties and set the color via javascript, but this is troublesome and can be prone to errors.

Additional context

I'd like to follow the UI5 WebComponents classes and variables so we can maybe support custom themes in the future.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions