Skip to content

Conversation

@gadenbuie
Copy link
Collaborator

@gadenbuie gadenbuie commented Nov 20, 2024

Small refactor to flatten nested rules in chat.scss, since the custom element rules don't need to be nested.

Flatter rules are easier to modify from userland and I contend they're easier to maintain because we retain nesting where class and element interactions are important.

@gadenbuie gadenbuie requested a review from cpsievert November 20, 2024 15:24
@cpsievert
Copy link
Collaborator

The inspiration for nesting is two-fold:

  1. Reduce the chance of clashing with other rules
  2. Provide a signal that the nested elements should only exist inside certain parent elements

That said, I don't feel those things necessarily trump simpler selectors in this case, so OK with me

@gadenbuie gadenbuie merged commit e60dad5 into main Nov 21, 2024
41 checks passed
@gadenbuie gadenbuie deleted the chat/refactor-sass branch November 21, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants