Closed tylersticka closed 8 years ago
I think that having them included is fine. I agree with the design changes, and I also wonder if we can achieve them using SUIT CSS classes instead of making component CSS for them.
This gets pretty close:
{{#each drizzle.data.toolkit.contents.colors}}
<ul class="drizzle-Grid drizzle-Grid--withGutter drizzle-u-listUnstyled">
{{#each this}}
<li class="
drizzle-Grid-cell
drizzle-u-sizeFull
drizzle-u-md-sizeFill">
<div style="border-top: 8em solid {{this}}"></div>
<strong>{{@key}}</strong>
<br>{{this}}
</li>
{{/each}}
</ul>
{{/each}}
We could also use an inline <svg>
element if we wanted to make the <img>
act like an actual image...
<svg viewBox="0 0 300 150" preserveAspectRatio="none" style="width: 100%; height: 8em;">
<rect width="100%" height="100%" fill="{{this}}"/>
</svg>
That seems like what some would call a better idea 👍
Small
@nicolemors @saralohr @erikjung @mrgerardorodriguez How do we feel about this prototype I whipped up?
Instead of a border-top
, each swatch is an inline <svg>
. This has a few benefits. Firstly, the sample actually has semantic meaning now... I'm marking this up with <figure>
because, even if no CSS loads, the image will be retained. But it also means the size can be determined in the markup simply by adjusting the width
and height
attributes of the element.
This also makes it easy to include a very faint semi-transparent stroke
around the sample, helping the lighter colors stand out against any background.
I dig it.
@tylersticka I like this too.
Nice! I agree, great work @tylersticka! 👍
Thanks, all!
Just to confuse things, I also did this variation: http://codepen.io/tylersticka/pen/reowXa
I don't think I like it as much because I find it slightly harder to read. But figured I'd share just for the heck of it. 😁
@tylersticka Oh, neat! I hadn't heard of TinyColor
, that's cool. I like the idea, but you are right, some of the white text color is a bit harder to read.
I do like the cleanliness of R3, but the color name info is kinda nice in R2, and it's a tad easier to read. I'm good with either of these options.
The only two projects that use Drizzle so far have both restored the color swatches. That suggests to me that we should consider adding them back.
I'd like if we abandoned the design we inherited from Fabricator. Some ideas for improvement might be:
Food for thought! 🍔