Skip to content

Refactor default theme #60

@ronilaukkarinen

Description

@ronilaukkarinen

First of all, good work! This navigation is beautiful and really works out of the box with WordPress and our ultra minimal and modern air-light theme.

I'd like very much to contribute with my first issue. I noticed theme default base is really hard to understand because it contains

  • Too much nesting
  • Too specific selectors
  • Too much overrides with specificity, :not and !important that should be avoided
  • Unnecessary & and > in wrong places, they should be after { not before
  • Duplicate selectors

Stylelint with our pretty reasonable standards causes 631 errors. Had to put in stylelint-disable sh-waqar/declaration-use-variable, no-descending-specificity, selector-max-combinators, selector-max-pseudo-class, selector-max-class, selector-max-compound-selectors, selector-max-specificity, declaration-no-important, max-nesting-depth, no-duplicate-selectors for now.

For example selectors of this next secenario should be in one line because in-between there's no specifications, it's also way too specific:

carbon (7)

So my suggestion is to simplify default theme structure by refactoring it completely. This would ensure people should have easy time creating their own themes. I personally had to do overrides because this overkill at the moment.

I used to nest too much in my past as well so I'm not blaiming anyone, we've all been there. I can gladly help in some point in the future, but right now I don't have enough time for anything else to bring this to your attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions