From 721ba0835c1437c607612c614d66e2e319feee08 Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Fri, 14 Dec 2012 12:34:09 -0800 Subject: [PATCH 1/8] add responsive grids css rule to cssgrids and update build.json --- src/cssgrids/build.json | 7 +++ src/cssgrids/css/cssgrids-responsive-base.css | 44 +++++++++++++++++++ src/cssgrids/meta/cssgrids.json | 13 ++++++ 3 files changed, 64 insertions(+) create mode 100644 src/cssgrids/css/cssgrids-responsive-base.css diff --git a/src/cssgrids/build.json b/src/cssgrids/build.json index 862d3188c13..0e119e90cc7 100644 --- a/src/cssgrids/build.json +++ b/src/cssgrids/build.json @@ -16,6 +16,13 @@ "cssfiles": [ "cssgrids-base.css" ] + }, + "cssgrids-responsive": { + "cssfiles": [ + "cssgrids-base.css", + "cssgrids-units.css", + "cssgrids-responsive-base.css" + ] } } } diff --git a/src/cssgrids/css/cssgrids-responsive-base.css b/src/cssgrids/css/cssgrids-responsive-base.css new file mode 100644 index 00000000000..efae2bbaba5 --- /dev/null +++ b/src/cssgrids/css/cssgrids-responsive-base.css @@ -0,0 +1,44 @@ +.yui3-g-responsive { + letter-spacing: -0.31em; + *letter-spacing: normal; + word-spacing: -0.43em; +} +.yui3-g-responsive img { + max-width: 100%; +} + +@media (min-width:980px) { + .yui3-visible-phone { + display: none; + } + .yui3-visible-tablet { + display: none; + } + .yui3-hidden-desktop { + display: none; + } +} +@media (max-width:480px) { + .yui3-g-responsive > [class ^= "yui3-u"] { + width: 100%; + } +} +@media (max-width:767px) { + .yui3-g-responsive > [class ^= "yui3-u"] { + width: 100%; + } + .yui3-hidden-phone { + display: none; + } + .yui3-visible-desktop { + display: none; + } +} +@media (min-width:768px) and (max-width:979px) { + .yui3-hidden-tablet { + display: none; + } + .yui3-visible-desktop { + display: none; + } +} \ No newline at end of file diff --git a/src/cssgrids/meta/cssgrids.json b/src/cssgrids/meta/cssgrids.json index 230dd15d346..34b24881f03 100644 --- a/src/cssgrids/meta/cssgrids.json +++ b/src/cssgrids/meta/cssgrids.json @@ -19,6 +19,19 @@ "type": "css" }, + "cssgrids-responsive": { + "requires": [ + "cssgrids", + "cssgrids-responsive-base" + ], + + "optional": [ + "cssreset", + "cssfonts" + ], + "type": "css" + }, + "cssgrids": { "optional": [ "cssreset", From 2b19f72571773b4cde04bdf77052d53c31478bc0 Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Fri, 14 Dec 2012 12:34:24 -0800 Subject: [PATCH 2/8] add cssgrids-responsive manual test --- src/cssgrids/tests/manual/responsive.html | 154 ++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 src/cssgrids/tests/manual/responsive.html diff --git a/src/cssgrids/tests/manual/responsive.html b/src/cssgrids/tests/manual/responsive.html new file mode 100644 index 00000000000..16ab5ac554f --- /dev/null +++ b/src/cssgrids/tests/manual/responsive.html @@ -0,0 +1,154 @@ + + + + + + + + +
+ +

YUI3 Responsive Grids

+

An example of making your YUI3 Grids behave responsively.

+ +
+ +
+

How does it work?

+
+
+

YUI3 Responsive Grids builds on top of the existing YUI3 Grids implementation. It adds a single new class name called .yui3-g-responsive. You can use this instead of using .yui3-g as you normally do. All elements with a class name of .yui3-u-*-* will automatically become responsive if they are direct descendents of a .yui3-g-responsive.

+ +

The HTML

+

The first gist shows how regular YUI3 grids are written. These grids are unresponsive. They'll always be one-thirds irrespective of the width of the screen. The second gist replaces the yui3-g with yui3-g-responsive, thereby making the one-third columns collapse to full width on lower screen widths.

+ +
+
+ + +

Features.

+
+
+
    +
  • Adds configurable media queries for different screen widths (Desktops, Landscape Tablets, Portrait Tablets, Phones)
  • +
  • Collapses elements to 100% if smaller than a certain width (767px by default)
  • +
  • Adjusts images to fit on smaller screens
  • +
  • Works with as many columns as you want (or as few)
  • +
+
+ +
+ +
+

Example.

+
+
+

Fast

+

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.

+
+
+ +
+
+

Complete

+

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.

+
+
+
+
+

Industrial Strength

+

A thriving community, a carefully architected infrastructure, and a comprehensive suite of tools help you code like a pro, from simple web pages to complex web applications.

+
+
+
+
+

Free and Open

+

YUI is free for all uses and is developed in the open on GitHub. Core team members can always be found in the forums and the #yui IRC channel on Freenode. Pull requests welcome!

+
+
+ +
+ test image +
+ +
+
+

Two-Fifth Column

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum dui turpis. Duis nulla dolor, suscipit in venenatis vitae, auctor eu nibh. Proin lobortis arcu nec tellus vehicula vitae pellentesque nisi molestie. Aenean felis ligula, hendrerit id dictum sed, ornare nec leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec non lectus et quam porttitor dignissim vitae ac odio. Aenean mattis dui porta lacus egestas ultricies. Mauris vel dolor libero, sit amet rhoncus nibh.

+
+
+ +
+
+

Three-Fifth Column

+

Quisque ac magna eget est porta varius ut eget quam. Curabitur tincidunt gravida nisl, vitae luctus velit vulputate vel. Aliquam sed sodales orci. Proin varius placerat magna tristique tincidunt. Morbi non dignissim felis. Proin bibendum libero nec felis eleifend porttitor. Morbi auctor venenatis justo, molestie luctus mi pulvinar nec. Pellentesque vitae ornare lacus. Nulla hendrerit tempor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis luctus facilisis cursus. Integer in lacinia dui. Phasellus ullamcorper, sem at congue pretium, velit sapien ornare mi, eu eleifend risus sapien ac eros.

+ +

Fusce accumsan, sem vitae tempus tempor, nulla lectus interdum felis, eget molestie urna mauris vel elit. Curabitur vel ipsum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam viverra, augue et sollicitudin dignissim, lectus tellus imperdiet lectus, a tempor ipsum mauris vitae augue. Nullam vel nulla a purus cursus consequat. Nulla orci elit, malesuada nec egestas non, ornare quis nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

+
+
+
+ +
+

Grids on mobile

+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+
+

Thirds

+

This cell will be a grid even on mobile devices.

+
+
+
+ + + \ No newline at end of file From 3b2d9f29a3d136fff034de3fcab3fe29da68930b Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Mon, 17 Dec 2012 16:21:56 -0800 Subject: [PATCH 3/8] add newlines --- src/cssgrids/css/cssgrids-responsive-base.css | 2 +- src/cssgrids/tests/manual/responsive.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cssgrids/css/cssgrids-responsive-base.css b/src/cssgrids/css/cssgrids-responsive-base.css index efae2bbaba5..a5264473082 100644 --- a/src/cssgrids/css/cssgrids-responsive-base.css +++ b/src/cssgrids/css/cssgrids-responsive-base.css @@ -41,4 +41,4 @@ .yui3-visible-desktop { display: none; } -} \ No newline at end of file +} diff --git a/src/cssgrids/tests/manual/responsive.html b/src/cssgrids/tests/manual/responsive.html index 16ab5ac554f..42b9e4d2ba5 100644 --- a/src/cssgrids/tests/manual/responsive.html +++ b/src/cssgrids/tests/manual/responsive.html @@ -151,4 +151,4 @@

Thirds

- \ No newline at end of file + From dea743be93d3f231b866f581a0adf9e776b9a5ae Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Wed, 26 Dec 2012 16:48:18 -0800 Subject: [PATCH 4/8] update responsive grids docs --- src/cssgrids/docs/index.mustache | 127 ++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/src/cssgrids/docs/index.mustache b/src/cssgrids/docs/index.mustache index 6c358548045..9e0e6cf25b7 100644 --- a/src/cssgrids/docs/index.mustache +++ b/src/cssgrids/docs/index.mustache @@ -14,8 +14,13 @@ ``` ``` +

If you want responsive behavior, pull down Responsive Grids instead.

-

Using YUI CSS Grids

+ + + + +

Using YUI CSS Grids

Unit Sizes

All of the sizing for YUI Grids is done using "units". Units can be subdivided up to 1/24 of the available width. The following table gives the various unit classes that can be applied.

@@ -214,3 +219,123 @@ body { ``` + +``` + + + + + +
+ +
+ +
+
+ +``` + + +

Responsive Grids

+ +

To pull down Responsive Grids, include this link element on your page:

+``` + +``` + +

YUI Responsive Grids builds on top of the existing YUI Grids implementation. It adds a single new class name called `.yui3-g-r`. You can use this instead of using `.yui3-g` as you normally do. All elements with a class name of `.yui3-u-*-*` will automatically become responsive if they are direct descendents of a `.yui3-g-r`. Images will shrink to fit the viewport, and units will collapse to 100% width when the viewport is 767px or below.

+ +

For example, consider the two HTML snippets below. The first gist shows how regular YUI grids are written. These grids are unresponsive. They’ll always be one-thirds irrespective of the width of the screen. The second gist replaces the `yui3-g` with `yui3-g-r`, thereby making the one-third columns collapse to full width on lower screen widths.

+ +``` +
+
...
+
...
+
...
+
+ +``` + +``` +
+
...
+
...
+
...
+
+``` + +

If you want some HTML elements to remain in a grid even on smaller screens, wrap them in the standard `.yui3-g`

+ + +

Media Queries

+ +

Responsive Grids listens to the following media queries. All `yui3-u-*` elements inside a `yui3-g-r` become 100% width at 767px or below.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Type of DisplayMedia Query Widths
Default Displays980px and up
Large Tablets768px to 979px
Smaller Tablets and Large Phones767px and below
Phones480px and below
+ +

Responsive Grids also comes with the following helper classes to show or hide content at different screen widths. Remember that to optimize performance and page load time, you should ideally determine what to show and hide on the server, instead of on the client.

+ + + + + + + + + + + + + + + + + + + + + + +
Helper Class NameDescription
`yui3-hidden-phone`Content marked with this class will be hidden below 768px
`yui3-hidden-tablet`Content marked with this class will be hidden between 768px and 979px
`yui3-hidden-desktop`Content marked with this class will be hidden above 980px
+ From b358906c882b830a29b8b3eec8e6730ff7f31041 Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Wed, 26 Dec 2012 16:48:49 -0800 Subject: [PATCH 5/8] rename yui3-g-responsive to yui3-g-r --- src/cssgrids/css/cssgrids-responsive-base.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cssgrids/css/cssgrids-responsive-base.css b/src/cssgrids/css/cssgrids-responsive-base.css index a5264473082..2258e1382a8 100644 --- a/src/cssgrids/css/cssgrids-responsive-base.css +++ b/src/cssgrids/css/cssgrids-responsive-base.css @@ -1,9 +1,9 @@ -.yui3-g-responsive { +.yui3-g-r { letter-spacing: -0.31em; *letter-spacing: normal; word-spacing: -0.43em; } -.yui3-g-responsive img { +.yui3-g-r img { max-width: 100%; } @@ -19,12 +19,12 @@ } } @media (max-width:480px) { - .yui3-g-responsive > [class ^= "yui3-u"] { + .yui3-g-r > [class ^= "yui3-u"] { width: 100%; } } @media (max-width:767px) { - .yui3-g-responsive > [class ^= "yui3-u"] { + .yui3-g-r > [class ^= "yui3-u"] { width: 100%; } .yui3-hidden-phone { From 31ed444f987d73a0b5f7e68dd35313a1cf1c6788 Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Wed, 26 Dec 2012 16:49:12 -0800 Subject: [PATCH 6/8] add helper classes to manual test --- src/cssgrids/tests/manual/responsive.html | 121 +++++++++++++--------- 1 file changed, 71 insertions(+), 50 deletions(-) diff --git a/src/cssgrids/tests/manual/responsive.html b/src/cssgrids/tests/manual/responsive.html index 42b9e4d2ba5..59d9630465e 100644 --- a/src/cssgrids/tests/manual/responsive.html +++ b/src/cssgrids/tests/manual/responsive.html @@ -4,7 +4,7 @@ - +
@@ -17,10 +17,10 @@

An example of making your YUI3 Grids behave responsively.

How does it work?
-

YUI3 Responsive Grids builds on top of the existing YUI3 Grids implementation. It adds a single new class name called .yui3-g-responsive. You can use this instead of using .yui3-g as you normally do. All elements with a class name of .yui3-u-*-* will automatically become responsive if they are direct descendents of a .yui3-g-responsive.

+

YUI3 Responsive Grids builds on top of the existing YUI3 Grids implementation. It adds a single new class name called .yui3-g-r. You can use this instead of using .yui3-g as you normally do. All elements with a class name of .yui3-u-*-* will automatically become responsive if they are direct descendents of a .yui3-g-r.

The HTML

-

The first gist shows how regular YUI3 grids are written. These grids are unresponsive. They'll always be one-thirds irrespective of the width of the screen. The second gist replaces the yui3-g with yui3-g-responsive, thereby making the one-third columns collapse to full width on lower screen widths.

+

The first gist shows how regular YUI3 grids are written. These grids are unresponsive. They'll always be one-thirds irrespective of the width of the screen. The second gist replaces the yui3-g with yui3-g-r, thereby making the one-third columns collapse to full width on lower screen widths.

@@ -39,54 +39,53 @@

Features.

-
-

Example.

-
-
-

Fast

-

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.

-
-
- -
-
-

Complete

-

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.

-
-
-
-
-

Industrial Strength

-

A thriving community, a carefully architected infrastructure, and a comprehensive suite of tools help you code like a pro, from simple web pages to complex web applications.

-
-
-
-
-

Free and Open

-

YUI is free for all uses and is developed in the open on GitHub. Core team members can always be found in the forums and the #yui IRC channel on Freenode. Pull requests welcome!

-
-
- -
- test image -
- -
-
-

Two-Fifth Column

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum dui turpis. Duis nulla dolor, suscipit in venenatis vitae, auctor eu nibh. Proin lobortis arcu nec tellus vehicula vitae pellentesque nisi molestie. Aenean felis ligula, hendrerit id dictum sed, ornare nec leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec non lectus et quam porttitor dignissim vitae ac odio. Aenean mattis dui porta lacus egestas ultricies. Mauris vel dolor libero, sit amet rhoncus nibh.

-
-
- -
-
-

Three-Fifth Column

-

Quisque ac magna eget est porta varius ut eget quam. Curabitur tincidunt gravida nisl, vitae luctus velit vulputate vel. Aliquam sed sodales orci. Proin varius placerat magna tristique tincidunt. Morbi non dignissim felis. Proin bibendum libero nec felis eleifend porttitor. Morbi auctor venenatis justo, molestie luctus mi pulvinar nec. Pellentesque vitae ornare lacus. Nulla hendrerit tempor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis luctus facilisis cursus. Integer in lacinia dui. Phasellus ullamcorper, sem at congue pretium, velit sapien ornare mi, eu eleifend risus sapien ac eros.

- -

Fusce accumsan, sem vitae tempus tempor, nulla lectus interdum felis, eget molestie urna mauris vel elit. Curabitur vel ipsum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam viverra, augue et sollicitudin dignissim, lectus tellus imperdiet lectus, a tempor ipsum mauris vitae augue. Nullam vel nulla a purus cursus consequat. Nulla orci elit, malesuada nec egestas non, ornare quis nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

-
-
+
+

Example.

+
+
+

Fast

+

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.

+
+
+ +
+
+

Complete

+

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.

+
+
+
+
+

Industrial Strength

+

A thriving community, a carefully architected infrastructure, and a comprehensive suite of tools help you code like a pro, from simple web pages to complex web applications.

+
+
+
+
+

Free and Open

+

YUI is free for all uses and is developed in the open on GitHub. Core team members can always be found in the forums and the #yui IRC channel on Freenode. Pull requests welcome!

+
+
+ +
+ test image +
+ +
+
+

Two-Fifth Column

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum dui turpis. Duis nulla dolor, suscipit in venenatis vitae, auctor eu nibh. Proin lobortis arcu nec tellus vehicula vitae pellentesque nisi molestie. Aenean felis ligula, hendrerit id dictum sed, ornare nec leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec non lectus et quam porttitor dignissim vitae ac odio. Aenean mattis dui porta lacus egestas ultricies. Mauris vel dolor libero, sit amet rhoncus nibh.

+
+ +
+
+

Three-Fifth Column

+

Quisque ac magna eget est porta varius ut eget quam. Curabitur tincidunt gravida nisl, vitae luctus velit vulputate vel. Aliquam sed sodales orci. Proin varius placerat magna tristique tincidunt. Morbi non dignissim felis. Proin bibendum libero nec felis eleifend porttitor. Morbi auctor venenatis justo, molestie luctus mi pulvinar nec. Pellentesque vitae ornare lacus. Nulla hendrerit tempor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis luctus facilisis cursus. Integer in lacinia dui. Phasellus ullamcorper, sem at congue pretium, velit sapien ornare mi, eu eleifend risus sapien ac eros.

+ +

Fusce accumsan, sem vitae tempus tempor, nulla lectus interdum felis, eget molestie urna mauris vel elit. Curabitur vel ipsum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam viverra, augue et sollicitudin dignissim, lectus tellus imperdiet lectus, a tempor ipsum mauris vitae augue. Nullam vel nulla a purus cursus consequat. Nulla orci elit, malesuada nec egestas non, ornare quis nibh. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

+
+

Grids on mobile

@@ -150,5 +149,27 @@

Thirds

+ +
+

Helper Classes

+
+
+

No Phones Allowed

+

Should be hidden on phones

+
+
+
+
+

No Tablets Allowed

+

Should be hidden on tablets

+
+
+
+
+

No big screens allowed.

+

Should be hidden on desktops/laptops

+
+
+
From 42adc2515284c2a17a822ab76149c165552f6191 Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Wed, 26 Dec 2012 16:49:47 -0800 Subject: [PATCH 7/8] add responsive grids newspaper example --- src/cssgrids/docs/component.json | 16 ++ .../docs/cssgrids-magazine-example.mustache | 2 + src/cssgrids/docs/cssgrids-magazine.mustache | 10 + .../cssgrids-magazine-source.mustache | 183 ++++++++++++++++++ 4 files changed, 211 insertions(+) create mode 100644 src/cssgrids/docs/cssgrids-magazine-example.mustache create mode 100644 src/cssgrids/docs/cssgrids-magazine.mustache create mode 100644 src/cssgrids/docs/partials/cssgrids-magazine-source.mustache diff --git a/src/cssgrids/docs/component.json b/src/cssgrids/docs/component.json index e2481d61fa4..71cc67dd175 100644 --- a/src/cssgrids/docs/component.json +++ b/src/cssgrids/docs/component.json @@ -50,6 +50,17 @@ "modules" : ["cssgrids"], "tags" : ["cssgrids"], + "hideTableOfContents": true + }, + + { + "newWindow" : "true", + "name" : "cssgrids-magazine", + "displayName": "Responsive Newspaper Layout", + "description": "A responsive layout that looks like a newspaper", + "modules" : ["cssgrids"], + "tags" : ["cssgrids"], + "hideTableOfContents": true } @@ -78,6 +89,11 @@ "name" : "cssgrids-align", "displayName": "CSS Grids Alignment Example", "layout" : "cssgrids-align-example" + }, + "cssgrids-magazine-example": { + "name" : "cssgrids-magazine", + "displayName": "CSS Grids Responsive Magazine Example", + "layout" : "cssgrids-magazine-example" } } } diff --git a/src/cssgrids/docs/cssgrids-magazine-example.mustache b/src/cssgrids/docs/cssgrids-magazine-example.mustache new file mode 100644 index 00000000000..15e96b05880 --- /dev/null +++ b/src/cssgrids/docs/cssgrids-magazine-example.mustache @@ -0,0 +1,2 @@ +{{>cssgrids-magazine-source}} +{{>test-runner}} \ No newline at end of file diff --git a/src/cssgrids/docs/cssgrids-magazine.mustache b/src/cssgrids/docs/cssgrids-magazine.mustache new file mode 100644 index 00000000000..a1f1f7d9608 --- /dev/null +++ b/src/cssgrids/docs/cssgrids-magazine.mustache @@ -0,0 +1,10 @@ +
+

The HTML for this example uses YUI3 Responsive Grids syntax to look great on different screen sizes (resize this page or view it on a smartphone). On larger screens, there are three columns. However, if viewed on a screen that is smaller than 767px, the columns stack vertically. The right-most column, which shows a stack of content on larger widths, changes to show a grid on smaller widths.

+
+ + + diff --git a/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache b/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache new file mode 100644 index 00000000000..f6a47968801 --- /dev/null +++ b/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache @@ -0,0 +1,183 @@ + + + + + + + + + + + +
+
+
+ +
+ +

The unstyled look of hipster food magazines

+

The latest trendy food and lifestyle magazines are driven by a desire to exist outside the mainstream food world and all that goes with it.

+
+ +
+
+

A free market will help fix health care

+ +
+

What Medicare needs is not more top-down control, but the flexibility and competition of a consumer-driven free market.

+
+
+
+ + +
+
+

Boston's last great unsolved mystery

+ +
+

In 1990, Boston’s Isabella Stewart Gardner Museum was robbed of 13 works of art. In this special section, delve into the Globe’s re-examination of the case.

+
+
+
+ +
+
+
+
+

Latest News

+
+

Health chief cites 'serious lapses' at state drug lab

+

The health secretary said lab management failed to alert the state after discovering a “serious breach of protocol” by a chemist.

+
+
+

Patrick addresses controversies on drug lab, hiring

+

Governor Patrick said a former highway safety chief with a bad driving record made his administration look “ridiculous.”

+
+
+

Powerball jackpot up to $550m

+

The fast-growing jackpot had been $450 million as recently as Tuesday morning.

+
+
+
+
+
+

Globe Exclusives

+
+ +

Scot Lehigh

+

End of the Menino era?

+
+
+ +

Suffolk shifts core of campus downtown

+
+
+ +

How to donate to Globe Santa

+
+
+
+
+ + + \ No newline at end of file From 5d7d6a5fce3714b80d95433e2062d3fbbb97cf3f Mon Sep 17 00:00:00 2001 From: Tilo Mitra Date: Thu, 27 Dec 2012 11:39:13 -0800 Subject: [PATCH 8/8] add example test --- .../docs/assets/cssgrids-magazine-tests.js | 16 ++++++++++++++++ .../partials/cssgrids-magazine-source.mustache | 1 + 2 files changed, 17 insertions(+) create mode 100644 src/cssgrids/docs/assets/cssgrids-magazine-tests.js diff --git a/src/cssgrids/docs/assets/cssgrids-magazine-tests.js b/src/cssgrids/docs/assets/cssgrids-magazine-tests.js new file mode 100644 index 00000000000..4d40638131c --- /dev/null +++ b/src/cssgrids/docs/assets/cssgrids-magazine-tests.js @@ -0,0 +1,16 @@ +YUI.add('cssgrids-magazine-tests', function(Y) { + + var suite = new Y.Test.Suite('cssgrids-magazine example test suite'), + Assert = Y.Assert; + + suite.add(new Y.Test.Case({ + name: 'Responsive tests', + 'images have max-widths defined': function() { + var headlineImg = Y.one('.left-bar .article img'); + Assert.isNotUndefined(headlineImg.getComputedStyle('maxWidth'), 'maxWidth undefined on images'); + } + })); + + Y.Test.Runner.add(suite); + +}, '', { requires: [ 'node', 'node-event-simulate' ] }); diff --git a/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache b/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache index f6a47968801..8c6b37d33e4 100644 --- a/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache +++ b/src/cssgrids/docs/partials/cssgrids-magazine-source.mustache @@ -6,6 +6,7 @@ +