Sha256: 5b5810c1dca23fda5d376b62bc4451fd0ea1703cd193b703697357b188d15ef4
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
// ======================================================================== // Component: half-float.less // ======================================================================== // // Float an absolute positioned element // and align it with a half top and bottom offset // relative to its parent // // .half-float // > .half-float-[top|bottom] // // ---------------------------------------------- $half-aligned-size: 120px; $half-aligned-gutter: 5px; .half-float { position: relative; margin-bottom: ($half-aligned-size/2) + $half-aligned-gutter; .half-float-bottom, .half-float-top { position: absolute; left: 50%; bottom: -($half-aligned-size/2); width: $half-aligned-size; height: $half-aligned-size; margin-left: -($half-aligned-size/2); z-index: 2; } .half-float-top { bottom: auto; top: -($half-aligned-size/2); } // The next sibling elements gets a negative margin // and padding to collapse the space between & + * { margin-top: -($half-aligned-size/2) + $half-aligned-gutter; padding-top: ($half-aligned-size/2) + $half-aligned-gutter; } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radius-rails-3.1.4 | app/assets/stylesheets/radius-theme/app/half-float.scss |