Browse Source

Moka: css

Nicolas Petton 10 years ago
parent
commit
3eda9395c7
4 changed files with 194 additions and 0 deletions
  1. 55 0
      css/moka.css
  2. 90 0
      css/moka.less
  3. 48 0
      css/reset.css
  4. 1 0
      index.html

+ 55 - 0
css/moka.css

@@ -0,0 +1,55 @@
+@import "reset.css";
+body {
+  background: #d5d5d5;
+}
+.moka_view .mk_default {
+  font-size: 12px;
+  color: #555;
+  text-shadow: 0 1px 0 white;
+}
+.moka_view .mk_control:focus {
+  outline: 0;
+}
+.moka_view button,
+.moka_view button:active,
+.moka_view button:focus {
+  font-size: 12px;
+  color: #555;
+  text-shadow: 0 1px 0 white;
+  margin: 100px;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+  border-top: solid 1px #999999;
+  border-left: solid 1px #999999;
+  border-right: solid 1px #999999;
+  border-bottom: solid 1px #999999;
+  background: #fafafa;
+  background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dedede), color-stop(1, #ffffff));
+  background: -ms-linear-gradient(bottom, #dedede, #ffffff);
+  background: -moz-linear-gradient(center bottom, #dedede 0%, #ffffff 100%);
+  background: -o-linear-gradient(#ffffff, #dedede);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dedede', GradientType=0);
+  -webkit-box-shadow: 0 1px 3px 0 #cccccc;
+  -moz-box-shadow: 0 1px 3px 0 #cccccc;
+  box-shadow: 0 1px 3px 0 #cccccc;
+  padding: 3px 10px;
+}
+.moka_view button:focus,
+.moka_view button:active:focus,
+.moka_view button:focus:focus {
+  outline: 0;
+}
+.moka_view button:active,
+.moka_view button:active:active,
+.moka_view button:focus:active {
+  -webkit-box-shadow: 0 0 3px 0 #cccccc;
+  -moz-box-shadow: 0 0 3px 0 #cccccc;
+  box-shadow: 0 0 3px 0 #cccccc;
+  background: #dedede;
+  background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fafafa), color-stop(1, #dedede));
+  background: -ms-linear-gradient(bottom, #fafafa, #dedede);
+  background: -moz-linear-gradient(center bottom, #fafafa 0%, #dedede 100%);
+  background: -o-linear-gradient(#dedede, #fafafa);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dedede', endColorstr='#fafafa', GradientType=0);
+}

+ 90 - 0
css/moka.less

@@ -0,0 +1,90 @@
+@import "reset.css";
+
+
+// Mixins
+.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
+    background: @color;
+    background: -webkit-gradient(linear,
+				 left bottom,
+				 left top,
+				 color-stop(0, @start),
+				 color-stop(1, @stop));
+    background: -ms-linear-gradient(bottom,
+                                    @start,
+                                    @stop);
+    background: -moz-linear-gradient(center bottom,
+                                     @start 0%,
+                                     @stop 100%);
+    background: -o-linear-gradient(@stop,
+                                   @start);
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
+}
+.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: 3px) {
+    -webkit-border-radius: @radius;
+    -moz-border-radius: @radius;
+    border-radius: @radius;
+}
+.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;
+}
+
+// Moka definitions
+
+// TEMP
+body {
+    background: #d5d5d5;
+}
+
+.moka_view {    
+
+    .mk_default {
+	// Generic fonts
+	font-size: 12px;
+	color: #555;
+	text-shadow: 0 1px 0 white;
+
+    }
+
+
+    // Controls
+    
+    .mk_control {
+	&:focus {
+	    outline: 0;
+	}
+    }
+
+    button, button:active, button:focus {
+	.mk_default;
+	.mk_control;
+	margin: 100px;
+	.rounded();
+	.bordered(#999, #999, #999, #999);
+	.gradient(#fafafa, #dedede, white);
+	.box-shadow(0 1px 3px 0 #ccc);
+	padding: 3px 10px;
+
+	&:active {
+	    .box-shadow(0 0 3px 0 #ccc);
+	    .gradient(#dedede, #fafafa, #dedede);
+	}
+    }
+}

+ 48 - 0
css/reset.css

@@ -0,0 +1,48 @@
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	font-size: 100%;
+	font: inherit;
+	vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+	display: block;
+}
+body {
+	line-height: 1;
+}
+ol, ul {
+	list-style: none;
+}
+blockquote, q {
+	quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: '';
+	content: none;
+}
+table {
+	border-collapse: collapse;
+	border-spacing: 0;
+}

+ 1 - 0
index.html

@@ -7,6 +7,7 @@
     <meta name="author" content="Nicolas Petton"/>
     <script type='text/javascript' src='support/amber.js'></script>
     <script type='text/javascript' src='support/requirejs/require.min.js'></script>
+    <link type="text/css" rel="stylesheet" href="css/moka.css"></link>
 </head>
 
 <body>