Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
b6b7d134
Commit
b6b7d134
authored
Jan 25, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish the rest of the less page mixins docs
parent
7d83f45e
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
193 additions
and
212 deletions
+193
-212
docs/less.html
docs/less.html
+73
-74
docs/scaffolding.html
docs/scaffolding.html
+1
-1
docs/templates/pages/less.mustache
docs/templates/pages/less.mustache
+108
-109
docs/templates/pages/scaffolding.mustache
docs/templates/pages/scaffolding.mustache
+1
-1
lib/mixins.less
lib/mixins.less
+9
-26
lib/scaffolding.less
lib/scaffolding.less
+1
-1
No files found.
docs/less.html
View file @
b6b7d134
...
@@ -406,14 +406,18 @@
...
@@ -406,14 +406,18 @@
<h3>
Basic mixins
</h3>
<h3>
Basic mixins
</h3>
<p>
A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.
</p>
<p>
A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.
</p>
<pre
class=
"prettyprint linenums"
>
<pre
class=
"prettyprint linenums"
>
Coming soon!
.element {
.clearfix();
}
</pre>
</pre>
</div>
<!-- /span4 -->
</div>
<!-- /span4 -->
<div
class=
"span4"
>
<div
class=
"span4"
>
<h3>
Parametric mixins
</h3>
<h3>
Parametric mixins
</h3>
<p>
A parametric mixin is just like a basic mixin, but it also accepts
optional Parameters (hence the name)
.
</p>
<p>
A parametric mixin is just like a basic mixin, but it also accepts
parameters (hence the name) with optional default values
.
</p>
<pre
class=
"prettyprint linenums"
>
<pre
class=
"prettyprint linenums"
>
Coming soon!
.element {
.border-radius(4px);
}
</pre>
</pre>
</div>
<!-- /span4 -->
</div>
<!-- /span4 -->
<div
class=
"span4"
>
<div
class=
"span4"
>
...
@@ -499,38 +503,38 @@
...
@@ -499,38 +503,38 @@
<tbody>
<tbody>
<tr>
<tr>
<td><code>
#font > #family > .serif()
</code></td>
<td><code>
#font > #family > .serif()
</code></td>
<td></td>
<td><
em
class=
"muted"
>
none
</em><
/td>
<td></td>
<td>
Make an element use a serif font stack
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > #family > .sans-serif()
</code></td>
<td><code>
#font > #family > .sans-serif()
</code></td>
<td></td>
<td><
em
class=
"muted"
>
none
</em><
/td>
<td></td>
<td>
Make an element use a sans-serif font stack
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > #family > .monospace()
</code></td>
<td><code>
#font > #family > .monospace()
</code></td>
<td></td>
<td><
em
class=
"muted"
>
none
</em><
/td>
<td></td>
<td>
Make an element use a monospace font stack
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > .shorthand()
</code></td>
<td><code>
#font > .shorthand()
</code></td>
<td></td>
<td><
code>
@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight
</code><
/td>
<td></td>
<td>
Easily set font size, weight, and leading
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > .serif()
</code></td>
<td><code>
#font > .serif()
</code></td>
<td></td>
<td><
code>
@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight
</code><
/td>
<td></td>
<td>
Set font family to serif, and control size, weight, and leading
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > .sans-serif()
</code></td>
<td><code>
#font > .sans-serif()
</code></td>
<td></td>
<td><
code>
@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight
</code><
/td>
<td></td>
<td>
Set font family to sans-serif, and control size, weight, and leading
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
#font > .monospace()
</code></td>
<td><code>
#font > .monospace()
</code></td>
<td></td>
<td><
code>
@size: @baseFontSize, @weight: normal, @lineHeight: @baseLineHeight
</code><
/td>
<td></td>
<td>
Set font family to monospace, and control size, weight, and leading
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -545,24 +549,24 @@
...
@@ -545,24 +549,24 @@
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td><code>
.
fixed-container
()
</code></td>
<td><code>
.
container-fixed
()
</code></td>
<td></td>
<td><
em
class=
"muted"
>
none
</em><
/td>
<td></td>
<td>
Provide a fixed-width (set with
<code>
@siteWidth
</code>
) container for holding your content
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.columns()
</code></td>
<td><code>
.columns()
</code></td>
<td></td>
<td><
code>
@columns: 1
</code><
/td>
<td></td>
<td>
Build a grid column that spans any number of columns (defaults to 1 column)
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.offset()
</code></td>
<td><code>
.offset()
</code></td>
<td></td>
<td><
code>
@columns: 1
</code><
/td>
<td></td>
<td>
Offset a grid column with left margin that spans any number of columns
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.gridColumn()
</code></td>
<td><code>
.gridColumn()
</code></td>
<td></td>
<td><
em
class=
"muted"
>
none
</em><
/td>
<td></td>
<td>
Make an element float like a grid column
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -570,7 +574,7 @@
...
@@ -570,7 +574,7 @@
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<thead>
<tr>
<tr>
<th
class=
"span
4
"
>
Mixin
</th>
<th
class=
"span
3
"
>
Mixin
</th>
<th>
Parameters
</th>
<th>
Parameters
</th>
<th>
Usage
</th>
<th>
Usage
</th>
</tr>
</tr>
...
@@ -578,68 +582,63 @@
...
@@ -578,68 +582,63 @@
<tbody>
<tbody>
<tr>
<tr>
<td><code>
.border-radius()
</code></td>
<td><code>
.border-radius()
</code></td>
<td></td>
<td><code>
@radius: 5px
</code></td>
<td></td>
<td>
Round the corners of an element. Can be a single value or four space-separated values
</td>
</tr>
<tr>
<td><code>
.border-radius-custom()
</code></td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.box-shadow()
</code></td>
<td><code>
.box-shadow()
</code></td>
<td></td>
<td><
code>
@shadow: 0 1px 3px rgba(0,0,0,.25)
</code><
/td>
<td></td>
<td>
Add a drop shadow to an element
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.transition()
</code></td>
<td><code>
.transition()
</code></td>
<td></td>
<td><
code>
@transition
</code><
/td>
<td></td>
<td>
Add CSS3 transition effect (e.g.,
<code>
all .2s linear
</code>
)
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.rotate()
</code></td>
<td><code>
.rotate()
</code></td>
<td></td>
<td><
code>
@degrees
</code><
/td>
<td></td>
<td>
Rotate an element
<em>
n
</em>
degrees
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.scale()
</code></td>
<td><code>
.scale()
</code></td>
<td></td>
<td><
code>
@ratio
</code><
/td>
<td></td>
<td>
Scale an element to
<em>
n
</em>
times it's original size
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.translate()
</code></td>
<td><code>
.translate()
</code></td>
<td></td>
<td><
code>
@x: 0, @y: 0
</code><
/td>
<td></td>
<td>
Move an element on the x and y planes
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.background-clip()
</code></td>
<td><code>
.background-clip()
</code></td>
<td></td>
<td><
code>
@clip
</code><
/td>
<td></td>
<td>
Crop the backgroud of an element (useful for
<code>
border-radius
</code>
)
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.background-size()
</code></td>
<td><code>
.background-size()
</code></td>
<td></td>
<td><
code>
@size
</code><
/td>
<td></td>
<td>
Control the size of background images via CSS3
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.box-sizing()
</code></td>
<td><code>
.box-sizing()
</code></td>
<td></td>
<td><
code>
@boxmodel
</code><
/td>
<td></td>
<td>
Change the box model for an element (e.g.,
<code>
border-box
</code>
for a full-width
<code>
input
</code>
)
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.user-select()
</code></td>
<td><code>
.user-select()
</code></td>
<td></td>
<td><
code>
@select
</code><
/td>
<td></td>
<td>
Control cursor selection of text on a page
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.resizable()
</code></td>
<td><code>
.resizable()
</code></td>
<td></td>
<td><
code>
@direction: both
</code><
/td>
<td></td>
<td>
Make any element resizable on the right and bottom
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.content-columns()
</code></td>
<td><code>
.content-columns()
</code></td>
<td></td>
<td><
code>
@columnCount, @columnGap: @gridColumnGutter
</code><
/td>
<td></td>
<td>
Make the content of any element use CSS3 columns
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -655,48 +654,48 @@
...
@@ -655,48 +654,48 @@
<tbody>
<tbody>
<tr>
<tr>
<td><code>
.#translucent > .background()
</code></td>
<td><code>
.#translucent > .background()
</code></td>
<td></td>
<td><
code>
@color: @white, @alpha: 1
</code><
/td>
<td></td>
<td>
Give an element a translucent background color
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#translucent > .border()
</code></td>
<td><code>
.#translucent > .border()
</code></td>
<td></td>
<td><
code>
@color: @white, @alpha: 1
</code><
/td>
<td></td>
<td>
Give an element a translucent border color
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .vertical()
</code></td>
<td><code>
.#gradient > .vertical()
</code></td>
<td></td>
<td><
code>
@startColor, @endColor
</code><
/td>
<td></td>
<td>
Create a cross-browser vertical background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .horizontal()
</code></td>
<td><code>
.#gradient > .horizontal()
</code></td>
<td></td>
<td><
code>
@startColor, @endColor
</code><
/td>
<td></td>
<td>
Create a cross-browser horizontal background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .directional()
</code></td>
<td><code>
.#gradient > .directional()
</code></td>
<td></td>
<td><
code>
@startColor, @endColor, @deg
</code><
/td>
<td></td>
<td>
Create a cross-browser directional background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .vertical-three-colors()
</code></td>
<td><code>
.#gradient > .vertical-three-colors()
</code></td>
<td></td>
<td><
code>
@startColor, @midColor, @colorStop, @endColor
</code><
/td>
<td></td>
<td>
Create a cross-browser three-color background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .radial()
</code></td>
<td><code>
.#gradient > .radial()
</code></td>
<td></td>
<td><
code>
@innerColor, @outerColor
</code><
/td>
<td></td>
<td>
Create a cross-browser radial background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradient > .striped()
</code></td>
<td><code>
.#gradient > .striped()
</code></td>
<td></td>
<td><
code>
@color, @angle
</code><
/td>
<td></td>
<td>
Create a cross-browser striped background gradient
</td>
</tr>
</tr>
<tr>
<tr>
<td><code>
.#gradientBar()
</code></td>
<td><code>
.#gradientBar()
</code></td>
<td></td>
<td><
code>
@primaryColor, @secondaryColor
</code><
/td>
<td></td>
<td>
Used for buttons to assign a gradient and slightly darker border
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
docs/scaffolding.html
View file @
b6b7d134
...
@@ -212,7 +212,7 @@
...
@@ -212,7 +212,7 @@
<tr>
<tr>
<td><code>
@siteWidth
</code></td>
<td><code>
@siteWidth
</code></td>
<td><em>
Computed sum of all columns and gutters
</em></td>
<td><em>
Computed sum of all columns and gutters
</em></td>
<td>
Counts number of columns and gutters to set width of the
<code>
.
fixed-container
()
</code>
mixin
</td>
<td>
Counts number of columns and gutters to set width of the
<code>
.
container-fixed
()
</code>
mixin
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
docs/templates/pages/less.mustache
View file @
b6b7d134
This diff is collapsed.
Click to expand it.
docs/templates/pages/scaffolding.mustache
View file @
b6b7d134
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
<tr>
<tr>
<td><code>
@siteWidth
</code></td>
<td><code>
@siteWidth
</code></td>
<td><em>
{{
_i
}}
Computed sum of all columns and gutters
{{/
i
}}
</em></td>
<td><em>
{{
_i
}}
Computed sum of all columns and gutters
{{/
i
}}
</em></td>
<td>
{{
_i
}}
Counts number of columns and gutters to set width of the
<code>
.
fixed-container
()
</code>
mixin
{{/
i
}}
</td>
<td>
{{
_i
}}
Counts number of columns and gutters to set width of the
<code>
.
container-fixed
()
</code>
mixin
{{/
i
}}
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
lib/mixins.less
View file @
b6b7d134
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
// Site container
// Site container
// -------------------------
// -------------------------
.
fixed-container
() {
.
container-fixed
() {
width: @siteWidth;
width: @siteWidth;
margin-left: auto;
margin-left: auto;
margin-right: auto;
margin-right: auto;
...
@@ -137,23 +137,6 @@
...
@@ -137,23 +137,6 @@
-moz-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
border-radius: @radius;
}
}
.border-radius-custom(@topLeft: 0, @topRight: 0, @bottomRight: 0, @bottomLeft: 0) {
-webkit-border-top-left-radius: @topLeft;
-moz-border-radius-topleft: @topLeft;
border-top-left-radius: @topLeft;
-webkit-border-top-right-radius: @topRight;
-moz-border-radius-topright: @topRight;
border-top-right-radius: @topRight;
-webkit-border-bottom-right-radius: @bottomRight;
-moz-border-radius-bottomright: @bottomRight;
border-bottom-right-radius: @bottomRight;
-webkit-border-bottom-left-radius: @bottomLeft;
-moz-border-radius-bottomleft: @bottomLeft;
border-bottom-left-radius: @bottomLeft;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
// Drop shadows
// Drop shadows
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
...
@@ -172,19 +155,19 @@
...
@@ -172,19 +155,19 @@
}
}
// Transformations
// Transformations
.rotate(@degrees
: 5deg
) {
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-webkit-transform: rotate(@degrees);
-moz-transform: rotate(@degrees);
-moz-transform: rotate(@degrees);
-ms-transform: rotate(@degrees);
-ms-transform: rotate(@degrees);
-o-transform: rotate(@degrees);
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
transform: rotate(@degrees);
}
}
.scale(@
value: 1.5
) {
.scale(@
ratio
) {
-webkit-transform: scale(@
value
);
-webkit-transform: scale(@
ratio
);
-moz-transform: scale(@
value
);
-moz-transform: scale(@
ratio
);
-ms-transform: scale(@
value
);
-ms-transform: scale(@
ratio
);
-o-transform: scale(@
value
);
-o-transform: scale(@
ratio
);
transform: scale(@
value
);
transform: scale(@
ratio
);
}
}
.translate(@x: 0, @y: 0) {
.translate(@x: 0, @y: 0) {
-webkit-transform: translate(@x, @y);
-webkit-transform: translate(@x, @y);
...
@@ -234,7 +217,7 @@
...
@@ -234,7 +217,7 @@
}
}
// CSS3 Content Columns
// CSS3 Content Columns
.content-columns(@columnCount, @columnGap:
20px
) {
.content-columns(@columnCount, @columnGap:
@gridColumnGutter
) {
-webkit-column-count: @columnCount;
-webkit-column-count: @columnCount;
-moz-column-count: @columnCount;
-moz-column-count: @columnCount;
column-count: @columnCount;
column-count: @columnCount;
...
...
lib/scaffolding.less
View file @
b6b7d134
...
@@ -18,7 +18,7 @@ body {
...
@@ -18,7 +18,7 @@ body {
// Container (centered, fixed-width layouts)
// Container (centered, fixed-width layouts)
.container {
.container {
.
fixed-container
();
.
container-fixed
();
}
}
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment