Logo

Mariusz Ciesla - User Interface Designer

  • Archive
  • RSS
  • Get in touch!
serialthrill:


  3D Printed Lamp Shades by Samuel Bernier


This is exactly why 3D printing is awesome.
View Separately

serialthrill:

3D Printed Lamp Shades by Samuel Bernier

This is exactly why 3D printing is awesome.

Source: airows

  • 1 month ago > airows
  • 246
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

Writing a simple custom lookup table in Sass

Recently in a project I have been required to create a simple style guide in Sass that would include all the brand colors, respond to change of colors easily and scale pretty straight-forward. Unfortunately, soon I found out that interpolation of string to a variable is not easy at all and maps that would map string to a variable are “somewhere in the future” of Sass.

After a fair amount of digging in news groups and trial-and-error experiments, I came up with a simple color lookup table for Sass using @function, nth() and index(). Performance of such a solution is not very good but it’s still worth it if you want to scale color scheme later on and have an automatically generated solution that works.

The markup of the color picker is as follows:

<ul class="colors">
  <li data-color="brand_red"></li>
  <li data-color="brand_blue"></li>
  ...
</ul>

And Sass generator looks like this:

$brand_red: #f20;
$brand_blue: #02f;
...

$color_names: brand_red, brand_blue, ...;
$color_values: $brand_red, $brand_blue, ...;

@function color-for($name) {
  @return nth($color_values, index($color_names, $name));
}

@each $color in $color_names {
  [data-color=#{$color}] { background: color-for($color); }
}

[data-color]:after { content: attr(data-color); }

This generates colored box with name of the color for every color in the $color_names / $color_values array set. I am still working on how to get rid of double array set up, but haven’t figured it yet. If you know the solution, feel free to ping me on Twitter and let me know.

    • #sass
    • #style guides
    • #lookup tables
    • #nth
    • #index
    • #@each
  • 9 months ago
  • 1
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

IFTTT Blog: The New IFTTT

Ladies and gentlemen, the new IFTTT is here!

Over the past few months, our team has been working hard to improve your experience with IFTTT. We’re proud to announce a new look, new language, new Channels, and speedier Triggers!

  • 11 months ago > ifttt
  • 528
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
When our tools don’t work, we tend to blame ourselves, for being too stupid, or not reading the manual or having too fat fingers… When our tools are broken, we feel broken. And when somebody fixes one, we feel a tiny bit more whole.
Steve Jobs on iPhone and usability
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Simplicity isn’t something you can stick on top of a user interface
Simplicity Isn’t Simple
  • 1 year ago
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+
Page 3 of 9
← Newer • Older →

About

My name is Mariusz and I design and build user interfaces for web and mobile products.

Pages

  • More about me

Me, Elsewhere

  • mariusz on Dribbble
  • mariuszciesla on Behance
  • mariusz on Forrst
  • @dotmariusz on Twitter
  • mariusz on Pinterest
  • mariusz on github
  • RSS
  • Random
  • Archive
  • Get in touch!
  • Mobile
Effector Theme by Pixel Union