Permalink
Browse files

Support for LESS stylesheets

  • Loading branch information...
1 parent b14219f commit 45647f94cc118780297c9cec0c32ab74355a1197 @dmfrancisco committed Aug 5, 2011
Showing with 255 additions and 109 deletions.
  1. +16 −0 lib/less-1.1.3.min.js
  2. +0 −108 slideshow/css/styles.css
  3. +4 −1 slideshow/master.html
  4. +120 −0 slideshow/styles/elements.less
  5. +21 −0 slideshow/styles/fonts.css
  6. +94 −0 slideshow/styles/styles.less
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,108 +0,0 @@
-
-@import url(http://fonts.googleapis.com/css?family=Droid+Sans:400,700|Maven+Pro:500|Crimson+Text:400italic|Calligraffitti);
-
-/* The same fonts as specified above, but intended for offline usage (optional) */
-@font-face {
- font-family: 'Throw My Hands Up in the Air';
- src: url('../fonts/ThrowMyHandsUpintheAir.ttf') format("truetype");
-}
-@font-face {
- font-family: 'Droid Sans';
- src: url('../fonts/DroidSans-Regular.ttf') format("truetype");
- font-weight: normal;
-}
-@font-face {
- font-family: 'Maven Pro';
- src: url('../fonts/MavenPro-Medium.ttf') format("truetype");
-}
-@font-face {
- font-family: 'Crimson Text';
- src: url('../fonts/CrimsonText-Italic.ttf') format("truetype");
- font-style: italic;
-}
-
-/* Some styles specific for this example presentation */
-
-section {
- font-family: 'Droid Sans', Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
- text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.8);
- padding: 0;
-}
-#deck h1 {
- font-size: 55px;
- font-family: 'Maven Pro', Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, cursive;
- letter-spacing: -3px;
- padding: 20px 50px 20px 50px;
- border-bottom: 2px dashed;
-}
-#deck h2 {
- font-size: 35px;
- padding-bottom: 45px;
-}
-#deck .content {
- padding: 30px 50px;
-}
-#deck .gap {
- height: 15px;
-}
-#deck p, #deck li {
- font-size: 35px;
- margin: 20px 0 20px 0;
-}
-#deck ul {
- margin-left: 70px;
-}
-#deck ul li {
- font-size: 30px;
- list-style-type: square;
-}
-.dotted {
- border-bottom: 1px dashed;
-}
-.cover {
- background: #d6d5cf url('../images/bgd.png');
- text-align: center;
-}
-.stripes {
- background: url('../images/stripes.png') center top repeat-x;
- width: 100%;
- height: 10px;
-}
-.note {
- color: #adaea7;
- font-family: 'Throw My Hands Up in the Air', 'Calligraffitti', cursive;
-}
-.serif {
- font-family: 'Crimson Text', 'Baskerville', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
-}
-.important {
- background: #d6d5cf;
- padding: 0 10px 0 10px;
- font-size: 40px;
-}
-mark, code, pre, .important {
- border: 1px solid #C6C9CB;
- box-shadow: 1px 1px 1px #d8d8d8;
- -webkit-box-shadow: 1px 1px 1px #d8d8d8;
- -moz-box-shadow: 1px 1px 1px #d8d8d8;
-}
-
-/* Highlighted text */
-
-mark {
- background: #f0f0ef;
- padding: 0 5px 0 5px;
-}
-
-/* Text selection */
-
-::-moz-selection {
- background: #FFFF9E;
- color: #111;
- text-shadow: none;
-}
-::selection {
- background: #FFFF9E;
- color: #111;
- text-shadow: none;
-}
View
@@ -16,7 +16,10 @@
<link rel="stylesheet" href="lib/styles.css" />
<!-- These are the styles you'll add to make the slides look great -->
- <link rel="stylesheet" href="<%= @root %>/css/styles.css" />
+ <link rel="stylesheet/less" href="<%= @root %>/styles/styles.less" />
+
+ <!-- Compile your LESS stylesheets -->
+ <script src="lib/less-1.1.3.min.js"></script>
<title>slideshow.html</title>
</head>
@@ -0,0 +1,120 @@
+/*---------------------------------------------------
+ LESS Elements 0.5
+ ---------------------------------------------------
+ A set of useful LESS mixins by Dmitry Fadeyev
+ Special thanks for mixin suggestions to:
+ Kris Van Herzeele,
+ Benoit Adam,
+ Portenart Emile-Victor
+
+ More info at: http://lesselements.com
+-----------------------------------------------------*/
+
+.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
+ background: @color;
+ background: -webkit-gradient(linear,
+ left bottom,
+ left top,
+ @start,
+ @stop);
+ background: -moz-linear-gradient(center bottom,
+ @start 0%,
+ @stop 100%);
+}
+.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
+ background: @color;
+ background: -webkit-gradient(linear,
+ left bottom,
+ left top,
+ color-stop(0, rgb(@start,@start,@start)),
+ color-stop(1, rgb(@stop,@stop,@stop)));
+ background: -moz-linear-gradient(center bottom,
+ rgb(@start,@start,@start) 0%,
+ rgb(@stop,@stop,@stop) 100%);
+}
+.bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
+ border-top: solid 1px @top-color;
+ border-left: solid 1px @left-color;
+ border-right: solid 1px @right-color;
+ border-bottom: solid 1px @bottom-color;
+}
+.drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
+ -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+ -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+ box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
+}
+.rounded(@radius: 2px) {
+ -webkit-border-radius: @radius;
+ -moz-border-radius: @radius;
+ border-radius: @radius;
+}
+.border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
+ -webkit-border-top-right-radius: @topright;
+ -webkit-border-bottom-right-radius: @bottomright;
+ -webkit-border-bottom-left-radius: @bottomleft;
+ -webkit-border-top-left-radius: @topleft;
+ -moz-border-radius-topright: @topright;
+ -moz-border-radius-bottomright: @bottomright;
+ -moz-border-radius-bottomleft: @bottomleft;
+ -moz-border-radius-topleft: @topleft;
+ border-top-right-radius: @topright;
+ border-bottom-right-radius: @bottomright;
+ border-bottom-left-radius: @bottomleft;
+ border-top-left-radius: @topleft;
+}
+.opacity(@opacity: 0.5) {
+ -moz-opacity: @opacity;
+ -khtml-opacity: @opacity;
+ -webkit-opacity: @opacity;
+ opacity: @opacity;
+}
+.transition-duration(@duration: 0.2s) {
+ -moz-transition-duration: @duration;
+ -webkit-transition-duration: @duration;
+ transition-duration: @duration;
+}
+.rotation(@deg:5deg){
+ -webkit-transform: rotate(@deg);
+ -moz-transform: rotate(@deg);
+ transform: rotate(@deg);
+}
+.scale(@ratio:1.5){
+ -webkit-transform:scale(@ratio);
+ -moz-transform:scale(@ratio);
+ transform:scale(@ratio);
+}
+.transition(@duration:0.2s, @ease:ease-out) {
+ -webkit-transition: all @duration @ease;
+ -moz-transition: all @duration @ease;
+ transition: all @duration @ease;
+}
+.inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
+ -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+ -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+ box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
+}
+.box-shadow(@arguments) {
+ -webkit-box-shadow: @arguments;
+ -moz-box-shadow: @arguments;
+ box-shadow: @arguments;
+}
+.columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
+ -moz-column-width: @colwidth;
+ -moz-column-count: @colcount;
+ -moz-column-gap: @colgap;
+ -moz-column-rule-color: @columnRuleColor;
+ -moz-column-rule-style: @columnRuleStyle;
+ -moz-column-rule-width: @columnRuleWidth;
+ -webkit-column-width: @colwidth;
+ -webkit-column-count: @colcount;
+ -webkit-column-gap: @colgap;
+ -webkit-column-rule-color: @columnRuleColor;
+ -webkit-column-rule-style: @columnRuleStyle;
+ -webkit-column-rule-width: @columnRuleWidth;
+ column-width: @colwidth;
+ column-count: @colcount;
+ column-gap: @colgap;
+ column-rule-color: @columnRuleColor;
+ column-rule-style: @columnRuleStyle;
+column-rule-width: @columnRuleWidth;
+}
View
@@ -0,0 +1,21 @@
+@import url(http://fonts.googleapis.com/css?family=Droid+Sans:400,700|Maven+Pro:500|Crimson+Text:400italic|Calligraffitti);
+
+/* The same fonts as specified above, but intended for offline usage (optional) */
+@font-face {
+ font-family: 'Throw My Hands Up in the Air';
+ src: url('../fonts/ThrowMyHandsUpintheAir.ttf') format("truetype");
+}
+@font-face {
+ font-family: 'Droid Sans';
+ src: url('../fonts/DroidSans-Regular.ttf') format("truetype");
+ font-weight: normal;
+}
+@font-face {
+ font-family: 'Maven Pro';
+ src: url('../fonts/MavenPro-Medium.ttf') format("truetype");
+}
+@font-face {
+ font-family: 'Crimson Text';
+ src: url('../fonts/CrimsonText-Italic.ttf') format("truetype");
+ font-style: italic;
+}
@@ -0,0 +1,94 @@
+/* Your fonts */
+@import url("fonts.css");
+
+/* LESS Elements is a set of useful mixins for the LESS CSS pre-processor (lesselements.com/) */
+@import "elements";
+
+/* Some styles specific for this example presentation */
+
+section {
+ font-family: 'Droid Sans', Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
+ text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.8);
+ padding: 0;
+}
+
+#deck {
+ h1 {
+ font-size: 55px;
+ font-family: 'Maven Pro', Geneva, 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', Verdana, cursive;
+ letter-spacing: -3px;
+ padding: 20px 50px 20px 50px;
+ border-bottom: 2px dashed;
+ }
+ h2 {
+ font-size: 35px;
+ padding-bottom: 45px;
+ }
+ p, li {
+ font-size: 35px;
+ margin: 20px 0 20px 0;
+ }
+ ul {
+ margin-left: 70px;
+
+ li {
+ font-size: 30px;
+ list-style-type: square;
+ }
+ }
+
+ .content {
+ padding: 30px 50px;
+ }
+ .gap {
+ height: 15px;
+ }
+ .dotted {
+ border-bottom: 1px dashed;
+ }
+ .cover {
+ background: #d6d5cf url('../images/bgd.png');
+ text-align: center;
+ }
+ .stripes {
+ background: url('../images/stripes.png') center top repeat-x;
+ width: 100%;
+ height: 10px;
+ }
+ .note {
+ color: #adaea7;
+ font-family: 'Throw My Hands Up in the Air', 'Calligraffitti', cursive;
+ }
+ .serif {
+ font-family: 'Crimson Text', 'Baskerville', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
+ }
+ .important {
+ background: #d6d5cf;
+ padding: 0 10px 0 10px;
+ font-size: 40px;
+ }
+ mark, code, pre, .important {
+ border: 1px solid #C6C9CB;
+ .box-shadow(1px 1px 1px #d8d8d8);
+ }
+ mark {
+ background: #f0f0ef;
+ padding: 0 5px 0 5px;
+ }
+}
+
+/* Text selection */
+
+@selected-text-background: #FFFF9E;
+@selected-text-foreground: #111;
+
+::-moz-selection {
+ background: @selected-text-background;
+ color: @selected-text-foreground;
+ text-shadow: none;
+}
+::selection {
+ background: @selected-text-background;
+ color: @selected-text-foreground;
+ text-shadow: none;
+}

0 comments on commit 45647f9

Please sign in to comment.