4 ms·
One nice feature modern frontend frameworks have nowadays is automatic component specific css rules IIRC in Vue, <style scoped> allows each element of the comp
by trinovantes 5y ago
One nice feature modern frontend frameworks have nowadays is automatic component specific css rules
IIRC in Vue, <style scoped> allows each element of the component to have an data-{id} attribute and every CSS rule is appended with [data={id}] selector so you're guaranteed no CSS rule leaks out and is contained in the same file
- no_wizard 5y agoDo keep in mind that this does come with a performance cost, especially in larger applications, as attribute selectors are slower than pure CSS classes, at least last time I ran some benchmarks.