Skip to content

Order is destroyed when merging across multiple pages #16

Closed
@peterbe

Description

@peterbe

minimalcss will generate minimal CSS payloads for multiple URLs. It then combines them into one final merged version. Suppose you have two URLs with different DOM nodes present.

// pageX.html's minimal CSS
.btn { font-size: 10px }
.btn-default { font-size: 12px }

...and...

// pageY.html's minimal CSS
.btn { font-size: 10px }

First you combine this into one blob of CSS so it becomes:

.btn { font-size: 10px }
.btn-default { font-size: 12px }
.btn { font-size: 10px }

...and run it through csso.minify()
you end up with this:

.btn-default{font-size:12px}.btn{font-size:10px}

Now, in the case of this <button class="btn btn-default"> you end up with a button that is font-size: 10px which is not what you wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions