Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

how to modify parsed css?  #31

@aloksharma1

Description

@aloksharma1

hi,
i have a requirement where i want to modify the parsed css and then replace it in style tag,
for example:

<style id="customCss">
.someClass {
  margin : 20px;  
}
@media (max-width: 600px) {
  .someClass {
  margin : 5px;  
}
}
</style>

i want to parse rule without media query, and modify it and then replace it back in style tag, how to achieve that?

basically i want this to turn into following output:

<style id="customCss">
.someClass {
  margin : 10px;  
  padding:5px;
}
@media (max-width: 600px) {
  .someClass {
  margin : 5px;  
  padding:0;
}
}
</style>

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