Skip to content

Eyeglass import, `$do`, and `font()`

Pre-release
Pre-release
Compare
Choose a tag to compare
@mirisuzanne mirisuzanne released this 18 Jul 23:03
187a5f6
  • NEW: Add _index.scss to simplify default "tools" import (core + plugins) in Eyeglass: @import 'accoutrement';
  • Core:
    • NEW: get-token() and ratio() functions accept $do argument, for on-the-fly adjustments
    • NEW: trim($string) utility now available in map-syntax, to trim white-space from the start and end of a string
    • NEW: str-replace() utility now forces arguments to string-type when appropriate, allowing e.g. calc(16px + 1vw) ('str-replace': 1vw 2vw)
  • Plugin: Animate
    • NEW: change(), time(), and ease() functions all accept $do arg for on-the-fly adjustments
  • Plugin: Color
    • BREAKING: color() functions accept $do arg for on-the-fly adjustments – before existing $palette argument
  • Plugin: Layout
    • NEW: break() function accept $do arg for on-the-fly adjustments
  • Plugin: Scale
    • BREAKING: size() function $units… variable argument has been replaced with $do map argument, for flexible on-the-fly adjustments. Non-map $do values are converted to ('convert-units': $do) before processing, to provide a shortcut for unit-conversions. size('root', 'cm') will continue to work, but size('root', 'em', 10px) should be changed to size('root', 'em' 10px) (with all unit args in a single list)
  • Plugin: Type
    • BREAKING: import-webfonts() mixin no longer accepts any arguments
    • NEW: font() function provides access to parsed font-data
    • NEW: 'trim' string helper strips whitespace from the start and end of a string
    • NEW: Improved font-normalization handles more font-map edge-cases
    • NEW: Font-stacks can be written as comma-delimited strings, e.g. 'Helvetica Neue, Helvetica, Arial' or 'Helvetica Neue, Helvetica, Arial'