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

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>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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