Replies: 2 comments
-
more text that was unclear in relationship to lion
|
Beta Was this translation helpful? Give feedback.
-
Hey, Good to bring this up 👍 It's very much related to best practices/apis for Subclassers like discussed here: #591 About BEM and its relation to LionI think in essence this document pledges for a structured, predictable api for Subclassers. ::-webkit-datetime-edit-fields-wrapper { background: silver; } We can't provide this api, so we need another structured approach for this (can be BEM, can be anything). Subclassing in practiceThere are two ways for a Subclasser to extend out Lion components and make them compatible with a Design System:
The docs were written with approach 1 in mind. The lowest barrier component extension (think of a lion-input) would be: class BlueBorderInput extends LionInput {
static get styles() {
return css`
.input-group {
border-color: blue;
}
`
}
// no template overrides
} When writing such a component, it might be benificial to have access to a 'raw' html/css structure like: https://github.com/ing-bank/lion/blob/master/packages/field/src/FormControlMixin.js#L260 So this default css structure can be provided in many ways. BEM is a good candidate, because:
And then there is the fact that we use BEM in our extension layer for 'pure css components (cards, links etc.') So... we could argue that something less opiniated than BEM would be a better fit. Then we would probably end up with something like our own BEM flavour, but call it differently 😄 Few other remarksThese docs can use an update/makeover (some of those things were written with a 'Polymer era mindset' and don't apply anymore (about performance etc.)). As for the big TODO: this was never supposed to end up in master as it was not written for '3rd party consumption' 😉 |
Beta Was this translation helpful? Give feedback.
-
Styling Guidelines had the following text inside...
restructure/rewrite/reconsider if still needed
https://github.com/ing-bank/lion/blob/master/docs/20-guidelines-styling.md
(Link will only become valid once the branch
feat/markdown
has been merged)Beta Was this translation helpful? Give feedback.
All reactions