Skip to content

postcss-logical changes selector specificity #90

Closed
@mi5ha6in

Description

@mi5ha6in

I use it together with the postcss-dir-pseudo-class. A problem arises when you need to change the value to the center in media queries, for example, text-align: start to text-align: center

.selector {
  text-align: start;
}

@media (max-width: 600px) {
  .selector {
   text-align: center;
  }
}

Generated:

[dir=‘ltr’] .selector { text-align: left }

@media (max-width: 600px) {
  .selector { text-align: center; }
}

And since the first selector has more weight, the media doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions