Skip to content

add support for compress css to native css nesting #902

Open
@i18nsite

Description

@i18nsite

https://caniuse.com/css-nesting
https://developer.mozilla.org/en-US/docs/Web/CSS/Nesting_selector
for example , compress

.form-group>input,
.form-group>textarea {
  width: 100%;
  padding: 8px;
}

.button-group .btn,
.button-group .btn-primary {
  padding: 10px 20px;
  border-radius: 4px;
}

.button-group .btn-primary {
  color: white;
}

.button-group .btn-primary:hover {
  background: #0056b3;
}

.button-group .btn-primary {
  font-size: 12px;
}

@media (max-width: 768px) {
  .header .nav {
    flex-direction: column;
    color: red;
  }

  .header .good {
    flex-direction: column;
    color: red;
  }

  .header {
    color: #000;
  }
}

into

.form-group {
  &>input, &>textarea {
    width: 100%;
    padding: 8px;
  }
}

.button-group {
  .btn, .btn-primary {
    padding: 10px 20px;
    border-radius: 4px;
  }
  .btn-primary {
    color: white;
    &:hover {
      background: #0056b3;
    }
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .header {
    .nav, .good {
      flex-direction: column;
      color: red;
    }
    color: #000;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions