by Benito Serna

Styler gem and Tachyons components

A list of examples from the list of Tachyons components, showing you how you can use the styler gem to define the styles composing the tachyons css classes.

< Back to index

List overflow

<%
  styles = Styler.new do
    style :container, %w(sans-serif ph3 ph5-ns pv4)
    style :links, %w(nowrap overflow-x-auto)
    style :link, %w(link dim gray f5 f4-ns dib mr3)
  end
%>

<nav class="<%= styles.container %>">
  <div class="<%= styles.links %>">
    <% 36.times do |i| %>
      <a class="<%= styles.link %>" href="#" title="Link <%= i %>">Link <%= i %></a>
    <% end %>
  </div>
</nav>