postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
595 stars 77 forks source link

Multiple font families separated with line breaks #196

Open otakustay opened 5 years ago

otakustay commented 5 years ago

Without any options specified, with postcss@7.0.21, postcss-cli@6.1.3 and postcss-custom-properties@9.0.2

:root {
    --font-family: 'Courier New', Courier, monospace;
}

div {
    font-family: var(--font-family);
}

becomes:

:root {
    --font-family: 'Courier New', Courier, monospace;
}

div {
    font-family: 'Courier New'
,
Courier
,
monospace;
    font-family: var(--font-family);
}
tranlamnhatnam commented 5 years ago

Same issue here!

Variable:

:root {
  ...
  --btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  ...
}

.btn:hover {
  ...
  transition: var(--btn-transition);
  ...
}

Output:

.btn:hover {
  ...
  transition: color
.15s
ease-in-out
,
background-color
.15s
ease-in-out
,
border-color
.15s
ease-in-out
,
box-shadow
.15s
ease-in-out;
  transition: var(--btn-transition);
  ...
}
SuperPat45 commented 5 years ago

Idem with a box-shadow!