forked from dutchcelt/FE-Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Egor Kloos
committed
Sep 7, 2011
1 parent
0078e34
commit b485390
Showing
11 changed files
with
301 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
<!DOCTYPE html> | ||
<html lang=""> | ||
<head> | ||
<title>Lunatech Labs - Front-end Patterns</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> | ||
<link rel="stylesheet" type="text/css" media="screen" href="styles/vanilla/css/main.css"> | ||
<script src="scripts/modernizr.js" type="text/javascript" charset="utf-8"></script> | ||
<script src="scripts/jquery.js" type="text/javascript" charset="utf-8"></script> | ||
<script src="scripts/jquery-ui.js" type="text/javascript" charset="utf-8"></script> | ||
<script src="scripts/init.js" type="text/javascript" charset="utf-8"></script> | ||
</head> | ||
<body> | ||
|
||
<header> | ||
<div class="logo">Front-end Patterns</div> | ||
</header> | ||
|
||
<nav> | ||
<ul> | ||
<li><a href="index.html">Home</a></li> | ||
<li><a href="usage.html">Usage</a></li> | ||
<li><a href="text.html">Content</a></li> | ||
<li><a href="forms.html">Forms</a></li> | ||
<li><a href="table.html">Tables</a></li> | ||
<li><a href="layout.html">Layout</a></li> | ||
<li class="active"><a href="boxes.html">Boxes</a></li> | ||
<li><a href="less.html">LESS</a></li> | ||
</ul> | ||
</nav> | ||
|
||
<article class="content"> | ||
|
||
<hgroup> | ||
<h1>Living in a box</h1> | ||
<h5>It's where your content lives!</h5> | ||
</hgroup> | ||
<section class="info"> | ||
<p>Boxes, panels and blocks al have something in common. So your CSS should be able to share share chunks of code without the need to overwrite inherited code. With LESS this is very important so that you can avoid properties repeating themselves. </p> | ||
<p>You can also see the maximum number of selectors in a rule. We've found that using more than four selectors is a good indicator of a problem with the implemented cascade. So keep your <a href="http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html" title="Andy Clarke's blog">specificity</a> as low as possible.</p> | ||
</section> | ||
<section class="examples"> | ||
<ul class=""> | ||
<li class="box"> | ||
<h3>Simple box</h3> | ||
<code> | ||
<body> | ||
<section class="box"> | ||
<h3>Simple box</h3> | ||
<p>lorem…</p> | ||
</section> | ||
</body> | ||
</code> | ||
<h5>Less code:</h5> | ||
<code> | ||
.box { | ||
.panel; | ||
.rounded-corners(); | ||
background-color: @light-color; | ||
.box-shadow(); | ||
} | ||
</code> | ||
</li> | ||
<li class="panel-box"> | ||
<header><h3>Box with header and footer*</h3></header> | ||
<section> | ||
<code> | ||
<body> | ||
<section class="panel-box"> | ||
<header> | ||
<h3>Box with header and footer*</h3> | ||
</header> | ||
<section>lorem…</section> | ||
<footer>* Optional text</footer> | ||
</section> | ||
</body> | ||
</code> | ||
<h5>Less code:</h5> | ||
<code> | ||
.panel-box { | ||
.box; | ||
.text-shadow(@l,@light-color); | ||
background-color: @grey1; | ||
} | ||
.panel-box header { | ||
.panel-inset; | ||
.rounded-corners-top(); | ||
.gradient(@light-color,@grey2); | ||
} | ||
.panel-box footer { | ||
.panel-inset; | ||
.rounded-corners-bottom(); | ||
background-color: @grey2; | ||
} | ||
.panel-box header ~ section { | ||
padding: @line 0; | ||
} | ||
</code> | ||
</section> | ||
<footer>* Optional text</footer> | ||
</li> | ||
<li class="panel-box highlighted"> | ||
<header><h3>Highlighted box</h3></header> | ||
<section> | ||
<code> | ||
<body> | ||
<section class="panel-box highlighted"> | ||
<header> | ||
<h3>Highlighted box</h3> | ||
</header> | ||
<section>lorem…</section> | ||
</section> | ||
</body> | ||
</code> | ||
<h5>Less code:</h5> | ||
<code> | ||
.highlighted { | ||
background-color: @yellow1; | ||
.gradient(@yellow1,@yellow2); | ||
} | ||
.highlighted header { | ||
color: @light-color; | ||
.text-shadow(0 - @l,@dark-color); | ||
.gradient(@grey5,@grey6); | ||
} | ||
</code> | ||
</section> | ||
</li> | ||
</ul> | ||
|
||
</section> | ||
|
||
</article> | ||
|
||
<footer> | ||
<p>Copyright © 2011, Lunatech Research B.V. All rights reserved.</p> | ||
</footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.