Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default CSS styles to share between buffers/modes #3102

Open
aartaka opened this issue Jul 27, 2023 · 1 comment
Open

Default CSS styles to share between buffers/modes #3102

aartaka opened this issue Jul 27, 2023 · 1 comment
Labels
good-first-issue Marks a good issue for first-time contributors. high ui/ux Nyxt User Interface: themes, appearance and usability.

Comments

@aartaka
Copy link
Contributor

aartaka commented Jul 27, 2023

buffer, status-buffer, panel-buffer, prompt-buffer etc. have a lot of duplicate styles. Not only this increases duplicate lines of code, it increases a maintenance burden: on has to update all the duplicate code lines, which is too easy to forget.

Putting all the shared styling in the same place will ensure the default styles are consistent across all of Nyxt. And then, we can easily style things accessibly and aesthetically without the need to duplicate these (oftentimes long) styles everywhere.

The implementation that I envision is:

  • Add a style slot to the browser.
  • Everywhere we have style, append the browser style.
    • Given that it's easy to forget, maybe integrate it into our theme:themed-css (as a Nyxt-specific wrapper?)

Tags:

  • ui/ux, because it obviously influences the consistency of our UI.
  • good-first-issue because it's a relatively easy refactoring: just take all the duplicate styles, move them to browser, and ensure they are used everywhere.
  • high, because having a chaotic set of styles hinders the speed of UI iterations (CC @lansingthomas).
@aartaka aartaka added good-first-issue Marks a good issue for first-time contributors. high ui/ux Nyxt User Interface: themes, appearance and usability. labels Jul 27, 2023
@aadcg
Copy link
Member

aadcg commented Jul 27, 2023

Given that *-buffer all inherit from buffer, I would suggest that the style slot of child classes should append the value of style from its parent.

Nonetheless, if the style of each of these classes is still a moving target, the current state may actually be easier to experiment/iterate. It's when that the styling will reach a more stable state that it will be easier to tells which parts apart general styles rules from particular ones. In that sense, I think this an idea for future consideration.

@aartaka aartaka mentioned this issue Jul 27, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Marks a good issue for first-time contributors. high ui/ux Nyxt User Interface: themes, appearance and usability.
Development

No branches or pull requests

2 participants