Closed janivo closed 3 years ago
I took a brief look at the ino-list
, ino-list-item
, and ino-list-divider
stylesheets and they are actually not as packed as it is the case with some other components. What is more, there aren't any mixins that could be used to replace the state-dependent styles (hover, active, focus), which account for the majority of the lines in the ino-list-item
stylesheet. Maybe I am overlooking something, but I don't think it's necessary to replace the existing styles with the mdc mixins.
For example, couldn't we replace this: https://github.com/inovex/elements/blob/8b91f4e51abf5a920ccf3718ccc54e13802768f1/packages/elements/src/components/ino-list-item/ino-list-item.scss#L69-L76
With something like this:
.mdc-list-item {
@include item-primary-text-ink-color(var(--list-item-deselected-color))
@include item-secondary-text-ink-color(var(--list-item-deselected-color))
background-color: var(--list-item-deselected-background-color);
// ...
As we're not see any benefit from saving two lines of code, we close the issue.
The new versions of the MDC list provide a whole lot of mixins we can use in order to cleanup our code. See: https://github.com/material-components/material-components-web/tree/v8.0.0/packages/mdc-list#sass-mixins