Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purecss Grids Offset Class

Tags:

yui-pure-css

I have been evaluating purecss and would like to know whether in its grid system there is an equivalent to Bootstrap's offset class.

The grids doco does not mention such a thing.

Thanks

like image 949
onefootswill Avatar asked Oct 15 '14 02:10

onefootswill


1 Answers

No, PureCSS doesn't have explicit support for Grid offsets; they seem to believe this is easy enough to tackle within the code of your own application.

See also:

  • GitHub Issues on PureCSS's repo (#318,#382)
  • The documentation on adding padding and borders to grid units
  • Snip2code example by emirpprime of purecss offset add-on
  • A discussion started by Daniel Genser on app.net

You can, however, fake it:

<div class="pure-g">
    <div class="pure-u-1-3">&nbsp;</div>
    <p class="pure-u-1-3">This would be displayed in the middle third.</p>
</div>

This isn't as "pure" (pun intended) as an offset, but it works, so I've used it.

It might not hurt to chime in on one of the issue reports if you'd like offsets in purecss, although so far it sounds like something they've chosen not to include.

like image 161
Geoffrey Wiseman Avatar answered Jan 04 '23 08:01

Geoffrey Wiseman