gr8 icon indicating copy to clipboard operation
gr8 copied to clipboard

Default utils

Open jongacnik opened this issue 6 years ago • 4 comments

I wanted to open a thread about what utils might make sense to add to core. One that I am always recreating is letter-spacing:

{
  prop: 'letter-spacing',
  vals: {
    1: '-0.15',
    2: 0
  },
  unit: 'em'
}

I'm also always creating borders, backgrounds, font colors, etc (see my default style.js), but I still think keeping design oriented classes out of core fits better with the intention of this module, since those are the places where I often get specific and granular. Open to a convo on this though.

jongacnik avatar Jan 12 '18 06:01 jongacnik

Going to drop in @s3ththompson's idea from #22:

one utility i think could be added to the default gr8 is a better way to give height to flexbox children when you want to make blocks that maintain aspect ratio when they scale.

I've been using:

{
  prop: { hc: 'height' },
  vals: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
  transform: v => Math.round((v / 12 * 100) * 100000) / 100000,
  unit: 'vw'
}

which gives .hc1{height: 8.33333vw;}, or in other words: height equal to the width of 1 column. Not sure if there's a better pattern or not, though.

jongacnik avatar Jan 12 '18 06:01 jongacnik

More cursor states https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

jongacnik avatar Jan 18 '18 00:01 jongacnik

Ability to defined min and max width as function of the grid sizes:

.wmn-c2
.wmx-s4

gdenisov avatar Feb 06 '18 19:02 gdenisov

+1 for borders, all the rest imo too project-specific.

sonn-gamm avatar Oct 02 '18 13:10 sonn-gamm