Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for escaped leftover css rules #18

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Fix for escaped leftover css rules #18

merged 1 commit into from
Apr 20, 2023

Conversation

nikolagava
Copy link
Contributor

fixes #17

}

.a:hover {
background-color: green;
Copy link
Owner

@vanng822 vanng822 Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add one more property here. Look like it may be a bug when we make string of all properties?
I unfortunately doesn't have a proper computer with Golang installed :-(

Copy link
Contributor Author

@nikolagava nikolagava Apr 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean when we add another unmergable class or two parameters in the same class?
Something like this works? Although, class b remains on div element.

.a:hover {
    background-color: green;
    border-radius: 8px;
}

.b {
    border: 2px solid blue;
}

Resulting in something like this

<html>

<head>
    <style type="text/css">
        .a:hover {
            background-color: green !important;
            border-radius: 8px !important
        }
    </style>
</head>

<body>
    <div class="a b" style="background-color:red;padding:10px;border:2px solid blue">Hover me!</div>
</body>

</html>

Note that both a and b classes are still applied, even though b shouldn't be.
Edit and lack of ; on line border-radius: 8px !important

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, it would still be ok if the last one is missing ;

@vanng822 vanng822 merged commit f1b06eb into vanng822:master Apr 20, 2023
@vanng822
Copy link
Owner

thank for helping @nikolagava

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leftover CSS rules are wrongly escaped
2 participants