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

CSS audit needed #1597

Open
joelit opened this issue Feb 29, 2024 · 1 comment
Open

CSS audit needed #1597

joelit opened this issue Feb 29, 2024 · 1 comment
Milestone

Comments

@joelit
Copy link
Contributor

joelit commented Feb 29, 2024

Description of the enhancement

With Skosmos main CSS file approaching the thousand line mark, we need to go through the individual definitions to spot inconsistencies

It would be easiest to bring the style sheet in line during the front update but before we start to finalize small details. If we are to define a colour theme picker, the CSS refactoring should be done before it.

What tools we should consider?

What approaches we can use

Why is the enhancement important?

We can proceed with the old CSS file and add to it when needed. It would just become even harder to maintain than currently, so we maybe should pay CSS some attention as a whole sooner rather than later.

@joelit joelit added this to the 3.0 milestone Feb 29, 2024
@kinow
Copy link
Collaborator

kinow commented Feb 29, 2024

I found that being able to use scss/sass drastically reduced and simplified some of my stylesheets. Having things like

@mixin skosmos-elem-div {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  ...
}

And reuse it in several places as needed,

#sidebar {
  @include skosmos-elem-div
}

#search-results {
  @include skosmos-elem-div
}

Which reduces duplication, and it is a lot easier to update. As well as being able to use hierarchy to define styles.

.skosmos-elem {
  font-family: name;
  font-size: 10px;
  
  &-special {  # skosmos-elem-special
    color: red;
  }

  div {
    p {
      @include some-mixin
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants