Skip to content

Commit a194d15

Browse files
committed
Merge pull request pure-css#43 from msweeney/grids-unit-match
Use "substring match" rather than "starts with" selector to match responsive units.
2 parents 5b96d92 + 7baee00 commit a194d15

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

HISTORY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Pure Change History
44
NEXT
55
----
66

7-
7+
* Fixed: Responsive grids fails to apply when another class precedes the unit
8+
class in markup. [#44]
89

910

1011
0.1.0 (2013-05-24)

src/grids/css/grids-r.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929
}
3030
}
3131
@media (max-width:480px) {
32-
.pure-g-r > [class ^= "pure-u"] {
32+
.pure-g-r > .pure-u,
33+
.pure-g-r > [class *= "pure-u-"] {
3334
width: 100%;
3435
}
3536
}
3637
@media (max-width:767px) {
37-
.pure-g-r > [class ^= "pure-u"] {
38+
.pure-g-r > .pure-u,
39+
.pure-g-r > [class *= "pure-u-"] {
3840
width: 100%;
3941
}
4042
.pure-hidden-phone {

src/grids/tests/manual/responsive.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ <h1 class="pure-u-1 centered">Features.</h1>
4040

4141
<div class="pure-g-r">
4242
<h1 class="pure-u-1 centered">Example.</h1>
43-
<div class="pure-u-1-4">
43+
<div class="pure-foo pure-u-1-4">
4444
<div class="cell">
4545
<h3>Fast</h3>
4646
<p>YUI's lightweight core and modular architecture make it scalable, fast, and robust. Built by frontend engineers at Yahoo!, YUI powers the most popular websites in the world.</p>
4747
</div>
4848
</div><!--/span-->
4949

50-
<div class="pure-u-1-4">
50+
<div class="pure-u-1-4 pure-foo">
5151
<div class="cell">
5252
<h3>Complete</h3>
5353
<p>YUI's intuitive and well-documented API takes you from basic DOM handling to building performant and maintainable applications on desktop browsers, mobile devices, and servers.</p>

0 commit comments

Comments
 (0)