Closed kevinschaul closed 5 years ago
Kevin, this is a useful addition. Before merging, I'd like to change the form of these override settings. There is already another way to stash data in an artboard name (layer names too). Instead of prefixes like f- and d-, you can append settings, like this: artboard_name:responsive
and artboard_name:dynamic
. There is a function for converting this kind of annotation to a JS object, getArtboardSettings(artboard)
.
Before merging, I also need to look into interactions between this feature and some NYT-specific code relating to responsiveness and breakpoints.
Thanks for this contribution :)
I merged your PR after switching from f-
and d-
prefixes to :dynamic
and :fixed
suffixes. Thanks :)
Awesome thank you @mbloch !
Hi all,
We've found it useful to be able to override the responsiveness setting for specific artboards. Often we want out smaller widths to flow responsively but not necessarily worry about the responsiveness of gaps between our larger artboards.
This PR allows overriding the responsiveness value of an artboard via the artboard name: Artboard names that begin with
f-
will be rendered in "fixed" mode, and names that begin withd-
will be rendered in "dynamic" mode. (I wasn't sure if there was another way to specify data on artboards. If you have other ideas I'd love to hear them.)Thanks as always for open sourcing such a useful tool.