Skip to content

Recommend the use of Less namespaces for extensions #322

Description

@davwheat

To prevent any mixin collisions between extensions, we should recommend the use of Less namespaces, similar to how we handle initiali(s/z)ers in JS.

https://lesscss.org/features/#mixins-feature-namespaces

They're not that tricky to understand, thankfully, using an ID-based system.

My suggested syntax would be #vendor__package. I don't know how Less would handle slashes, etc.

#davwheat__sidebar-nav-items {
  .my-cool-mixin() {
    color: red;
  }
}

button.davwheat_btn {
  #davwheat__sidebar-nav-items.my-cool-mixin();
}

Eventually, core should switch to something like #flarum__core.xxx(), or similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions