Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Neccessary whitespace in @supports removed #71

Open
SassCoder opened this issue Jul 1, 2019 · 3 comments
Open

Neccessary whitespace in @supports removed #71

SassCoder opened this issue Jul 1, 2019 · 3 comments

Comments

@SassCoder
Copy link

Why is issue #52 closed?

Minification and Optimization removes neccessary whitespace after or.

// CSS
@supports ((position: -webkit-sticky) or (position: sticky)) {
	.element {
		position : -webkit-sticky
		position : sticky;
	}
}

// Result
@supports((position:-webkit-sticky) or(position:sticky)){.element{position:-webkit-sticky;position:sticky}}

Without this whitespace, the @support rule is broken and is not interpreted by the browser.

Best Regards

@ghost
Copy link

ghost commented Oct 22, 2019

Same for media queries.

Example with this :
@media only screen and (min-width:768px) {

Become like that after uglify :
@media only screen and(min-width:768px){

@FlowIT-JIT
Copy link

Any progress on this issue? Is there any known work around available ?

@Farrael22
Copy link

Farrael22 commented Apr 26, 2023

This issue also happens when defining a media-query inside an id block.

this:

@media screen and (min-width: $size) { 
  #id {
    ...
  }
}

becomes:

@media screen and(min-width: $size){#id {...}}

where {# corresponds to a comment token on some CRM tools such as Hubspot.

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

No branches or pull requests

3 participants