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
a7e5bac2
Commit
a7e5bac2
authored
Aug 23, 2013
by
Chris Rebert
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10100 from twbs/document_hide_text
Fixes #10076: Document hide text
parents
48d929d6
a66ccbc5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
_includes/nav-css.html
_includes/nav-css.html
+1
-0
css.html
css.html
+12
-0
less/mixins.less
less/mixins.less
+16
-0
less/utilities.less
less/utilities.less
+1
-1
No files found.
_includes/nav-css.html
View file @
a7e5bac2
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
<li><a
href=
"#helper-classes-floats"
>
Quick floats
</a></li>
<li><a
href=
"#helper-classes-floats"
>
Quick floats
</a></li>
<li><a
href=
"#helper-classes-clearfix"
>
Clearfix
</a></li>
<li><a
href=
"#helper-classes-clearfix"
>
Clearfix
</a></li>
<li><a
href=
"#helper-classes-screen-readers"
>
Screen reader content
</a></li>
<li><a
href=
"#helper-classes-screen-readers"
>
Screen reader content
</a></li>
<li><a
href=
"#helper-classes-image-replacement"
>
Image replacement
</a></li>
</ul>
</ul>
</li>
</li>
<li>
<li>
...
...
css.html
View file @
a7e5bac2
...
@@ -2292,6 +2292,18 @@ For example, <code><section></code> should be wrapped as inline.
...
@@ -2292,6 +2292,18 @@ For example, <code><section></code> should be wrapped as inline.
}
}
{% endhighlight %}
{% endhighlight %}
<h3
id=
"helper-classes-image-replacement"
>
Image replacement
</h3>
<p>
Utilize the
<code>
.text-hide
</code>
class or mixin to help replace an element's text content with a background image.
</p>
{% highlight html %}
<h1
class=
"text-hide"
>
Custom heading
</h1>
{% endhighlight %}
{% highlight css %}
// Usage as a Mixin
.heading {
.text-hide();
}
{% endhighlight %}
</div>
</div>
...
...
less/mixins.less
View file @
a7e5bac2
...
@@ -69,7 +69,15 @@
...
@@ -69,7 +69,15 @@
}
}
// CSS image replacement
// CSS image replacement
//
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
// mixins being reused as classes with the same name, this doesn't hold up. As
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
// that we cannot chain the mixins together in Less, so they are repeated.
//
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
// Deprecated as of v3.0.1 (will be removed in v4)
.hide-text() {
.hide-text() {
font: ~"0/0" a;
font: ~"0/0" a;
color: transparent;
color: transparent;
...
@@ -77,6 +85,14 @@
...
@@ -77,6 +85,14 @@
background-color: transparent;
background-color: transparent;
border: 0;
border: 0;
}
}
// New mixin to use as of v3.0.1
.text-hide() {
font: ~"0/0" a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
...
...
less/utilities.less
View file @
a7e5bac2
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
visibility: hidden;
visibility: hidden;
}
}
.text-hide {
.text-hide {
.
hide-text
();
.
text-hide
();
}
}
...
...
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