esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

add support for compress css to native css nesting

Open i18nsite opened this issue 10 months ago • 0 comments

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;
  }
}

i18nsite avatar Jan 26 '25 06:01 i18nsite