Sketch finally has colour management

over 4 years ago from Cristian Moisei,

  • Dylan SmithDylan Smith, over 4 years ago

    In CSS, it's possible to set the spread to a negative value. I use this effect most often for adding a subtle shadow below elements like cards that is visible beneath the elements — but not out the sides as the default spread value of 0 would render.

    Example CSS with values for horizontal offset, vertical offset, blur radius, spread radius, and colour:

    box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.2);

    Sketch previously only allowed positive values for the spread. This not only meant that this effect wasn't possible without hacking it with extra elements, but that Sketch files didn't match coded pages and/or the intended design was more difficult to communicate to developers.

    Treehouse has a helpful video about box-shadow spread and you can try it yourself with this generator,

    9 points