vaadin / docs

Official documentation for Vaadin and Hilla.
https://vaadin.com/docs
Other
29 stars 183 forks source link

[notification] text in dark mode can't be read #1320

Open knoobie opened 2 years ago

knoobie commented 2 years ago

Opening a notification (default styling) with text in it, while having dark-mode active, makes the text unreadable.

Example

https://vaadin.com/docs/latest/ds/components/notification/#interactive-elements

image

jouni commented 2 years ago

Thanks. This is one case that suggests that components should reset text related properties in their host. On the other hand, it makes it more difficult to override them, as you will most probably need to use the --lumo-* properties to override them when you can’t rely on default inheritance.

knoobie commented 2 years ago

This only happened in the docs, if I open https://vaadin.com/docs/latest/example?embed=notification-link-wc.js&import=component/notification/notification-link.ts and change it to theme=dark it looks good

jouni commented 2 years ago

Sure. There are some style sheets in the docs that define the default text color, and that is inherited by the content in the notification. When an example is opened standalone, those style sheets are not included.