Closed 13twelve closed 8 months ago
Apologies for taking a while to respond to this, I have quite a few things going on at the moment but wanted to let you know that I'll look into this as soon as I find some time ❤️
I'll refactor and re-submit soon
Closing this due to inactivity
data
/fragment
rem
andpx
withrem
defaultoptions.md
A common use case for us at AREA 17 is needing to insert icons into pages at the original authored size of the icon - because we often manually hint icons and especially logos to sit perfectly on the pixel grid, to render at their best, per size. So, lets say we have an "arrow" icon we want to display at 24px and at 32px. We might have separate icons rather than scaling one up and down - so we can have different weights, different hinting, better on pixel grid spacing etc.
Its useful for us to be able to:
And it display a 24x24 SVG in the page without having to add additional classes manually such as:
So, this PR adds a
styles.format
option ofdimensions
, which, if you have selected a CSS file as your output, will output something like:If you want to keep using the background image based setup, there is an option
includeDimensions: true,
, which would output:or, using
fragment
:I've also added a
unit
selection option and changed the default output units torem
, withpx
being an option, for both CSS and SCSS formats so that any sprite usages can scale with user font scaling preferences.