mirror of
https://github.com/clearleft/clearless.git
synced 2026-01-07 21:03:51 -05:00
Fix grid mixin column definitions
This commit is contained in:
27
README.md
27
README.md
@@ -564,6 +564,33 @@ p {
|
||||
}
|
||||
```
|
||||
|
||||
### .font-face()
|
||||
|
||||
Generates a font-face declaration block. Should be used outside of any element selectors.
|
||||
|
||||
|
||||
```css
|
||||
.font-face( <@font-family>, <@font-path>, );
|
||||
```
|
||||
|
||||
* `@px-size`: Font size (in pixels) to convert to rems.
|
||||
|
||||
```css
|
||||
/* Usage: */
|
||||
.font-face( 'MyNiceFontBold', '/fonts/my_nice_font', bold );
|
||||
/* Example output: */
|
||||
@font-face {
|
||||
font-family: 'MyNiceFontBold';
|
||||
src: url('/fonts/my_nice_font.eot');
|
||||
src: url('/fonts/my_nice_font.eot?#iefix') format('embedded-opentype'),
|
||||
url('/fonts/my_nice_font.woff') format('woff'),
|
||||
url('/fonts/my_nice_font.ttf') format('truetype');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Sprites
|
||||
-------
|
||||
|
||||
|
||||
@@ -33,16 +33,30 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
.column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) {
|
||||
.column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) and not (isnumber(@end-column)) {
|
||||
@showgutter: false;
|
||||
.column(@showgutter);
|
||||
.span( @span, @total-columns, @end-column );
|
||||
.span( @span, @total-columns );
|
||||
}
|
||||
|
||||
.column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) and (@end-column = true) {
|
||||
@showgutter: false;
|
||||
.column(@showgutter);
|
||||
.span( @span, @total-columns );
|
||||
.end-column();
|
||||
}
|
||||
|
||||
.column( @span, @end-column ) when (isnumber(@span)) and not (isnumber(@end-column)) {
|
||||
@showgutter: false;
|
||||
.column(@showgutter);
|
||||
.span( @span, @end-column );
|
||||
.span( @span );
|
||||
}
|
||||
|
||||
.column( @span, @end-column ) when (isnumber(@span)) and ( @end-column = true ) {
|
||||
@showgutter: false;
|
||||
.column(@showgutter);
|
||||
.span( @span );
|
||||
.end-column();
|
||||
}
|
||||
|
||||
|
||||
@@ -64,15 +78,30 @@
|
||||
.inline-column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (isnumber(@total-columns)) {
|
||||
@showgutter: false;
|
||||
.inline-column(@showgutter);
|
||||
.span( @span, @total-columns, @end-column );
|
||||
.span( @span, @total-columns );
|
||||
}
|
||||
|
||||
.inline-column( @span, @total-columns:@total-columns, @end-column:false ) when (isnumber(@span)) and (@end-column = true) {
|
||||
@showgutter: false;
|
||||
.inline-column(@showgutter);
|
||||
.span( @span, @total-columns );
|
||||
.inline-end-column();
|
||||
}
|
||||
|
||||
.inline-column( @span, @end-column ) when not (isnumber(@end-column)) {
|
||||
@showgutter: false;
|
||||
.inline-column(@showgutter);
|
||||
.span( @span, @end-column );
|
||||
.span( @span );
|
||||
}
|
||||
|
||||
.inline-column( @span, @end-column ) when (@end-column = true) {
|
||||
@showgutter: false;
|
||||
.inline-column(@showgutter);
|
||||
.span( @span );
|
||||
.inline-end-column();
|
||||
}
|
||||
|
||||
|
||||
|
||||
.end-column() {
|
||||
margin-right: 0;
|
||||
|
||||
@@ -11,3 +11,29 @@
|
||||
.font-size-ems(@target-px-size, @context-px-size:@base-font-size) {
|
||||
font-size: (@target-px-size / @context-px-size) * 1em;
|
||||
}
|
||||
|
||||
.font-face( @family-name, @font-path, @font-weight:normal, @font-style:normal, @include-svg:false ) when not (@include-svg) {
|
||||
@font-face {
|
||||
font-family: @family-name;
|
||||
src: url('@{font-path}.eot');
|
||||
src: url('@{font-path}.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{font-path}.woff') format('woff'),
|
||||
url('@{font-path}.ttf') format('truetype');
|
||||
font-weight: @font-weight;
|
||||
font-style: @font-style;
|
||||
}
|
||||
}
|
||||
|
||||
.font-face( @family-name, @font-path, @font-weight:normal, @font-style:normal, @include-svg:false ) when (@include-svg) {
|
||||
@font-face {
|
||||
font-family: @family-name;
|
||||
src: url('@{font-path}.eot');
|
||||
src: url('@{font-path}.eot?#iefix') format('embedded-opentype'),
|
||||
url('@{font-path}.woff') format('woff'),
|
||||
url('@{font-path}.ttf') format('truetype'),
|
||||
url('@{font-path}.svg#@{family-name}') format('svg');
|
||||
font-weight: @font-weight;
|
||||
font-style: @font-style;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user