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

Consider CSS refactor #120

Closed
3 tasks done
tuurep opened this issue Jul 23, 2024 · 10 comments · Fixed by #151
Closed
3 tasks done

Consider CSS refactor #120

tuurep opened this issue Jul 23, 2024 · 10 comments · Fixed by #151
Assignees
Labels
topic:design focussed on CSS-related things topic:infrastructure e.g. API, config type:enhancement Adding to/changing existing feature type:refactor Non-functional changes

Comments

@tuurep
Copy link
Collaborator

tuurep commented Jul 23, 2024

  • split up the current styles.css into a dedicated markdown.css file and another one that has everything else that's more general
  • extract all the colors into variables and remove the media query for light mode there
  • add two files colors-dark.css and colors-light.css where we do have media queries and just define all the color variables

Original description

Followup from discussion #118 (comment)

Regarding color variables like this:

:root {
    --color-alert-note: #a5d5fe;
    --color-alert-tip: #b4fa72;
    --color-alert-important: #ff8ffd;
    --color-alert-warning: #fefdc2;
    --color-alert-caution: #ff8272;
}

I would prefer if we could refactor and do this for everything then🙈 Would you mind looking into that? It would make the CSS much easier to read and use

Ideas about adding more tooling for CSS:

Since we're already talking about refactoring CSS: We could also consider to start using something like https://lesscss.org/ or some other compiler for the CSS to make it even easier to work with. What do you think? If you like this or another one I can add it to the dev and build infrastructures

@tuurep tuurep added type:enhancement Adding to/changing existing feature type:refactor Non-functional changes topic:infrastructure e.g. API, config topic:design focussed on CSS-related things labels Jul 23, 2024
@jannis-baum
Copy link
Owner

Hey @tuurep I think you are mainly in charge of CSS and styling here ^^ so what do you think about the question of the compiler?

@tuurep
Copy link
Collaborator Author

tuurep commented Jul 25, 2024

Honestly I know absolutely nothing about that

But I can start looking at it after getting everything else out of the way

@jannis-baum
Copy link
Owner

Honestly I know absolutely nothing about that

But I can start looking at it after getting everything else out of the way

Okay, no worries! If you think we don't need it we can also forget about it. Let me know when the time comes :)

@tuurep
Copy link
Collaborator Author

tuurep commented Jul 25, 2024

Yeah lets keep this at the backburner, non-urgent

@jannis-baum
Copy link
Owner

So since no one was excited about a compiler I would not add one and stay with Vanilla CSS, just refactoring the following:

  • split up the current styles.css into a dedicated markdown.css file and another one that has everything else that's more general
  • extract all the colors into variables and remove the media query for light mode there
  • add two files colors-dark.css and colors-light.css where we do have media queries and just define all the color variables

@tuurep what do you think?

@tuurep
Copy link
Collaborator Author

tuurep commented Jul 30, 2024

Yes, that sounds good to me!

But do I understand correctly that every single color should be used as a variable instead of straight hex colors in tags?

@jannis-baum
Copy link
Owner

But do I understand correctly that every single color should be used as a variable instead of straight hex colors in tags?

Yes, that's what I was thinking. So that the dark vs. light mode is just a matter of changing the color variables' values and making other color-only adjustments is easy for users in customization.

@jannis-baum jannis-baum self-assigned this Jul 30, 2024
@tuurep
Copy link
Collaborator Author

tuurep commented Jul 30, 2024

Yeah, lets go with that. Did you wanna do this, as you've self-assigned? 😄

@jannis-baum
Copy link
Owner

Yes, I was thinking to do this before the Notebook colors so that we don't touch everything twice ^^

@tuurep
Copy link
Collaborator Author

tuurep commented Jul 30, 2024

Ok, thanks!

jannis-baum added a commit that referenced this issue Aug 1, 2024
jannis-baum added a commit that referenced this issue Aug 1, 2024
jannis-baum added a commit that referenced this issue Aug 3, 2024
jannis-baum added a commit that referenced this issue Aug 3, 2024
jannis-baum added a commit that referenced this issue Aug 5, 2024
tuurep added a commit that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:design focussed on CSS-related things topic:infrastructure e.g. API, config type:enhancement Adding to/changing existing feature type:refactor Non-functional changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants