Skip to content

Commit

Permalink
Add css code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 9, 2018
1 parent b9240ee commit 924a365
Show file tree
Hide file tree
Showing 5 changed files with 355 additions and 0 deletions.
33 changes: 33 additions & 0 deletions code/css.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* Some example CSS */

@import url("something.css");

body {
margin: 0;
padding: 3em 6em;
font-family: tahoma, arial, sans-serif;
color: #000;
}

#navigation a {
font-weight: bold;
text-decoration: none !important;
}

h1 {
font-size: 2.5em;
}

h2 {
font-size: 1.7em;
}

h1:before, h2:before {
content: "::";
}

code {
font-family: courier, monospace;
font-size: 80%;
color: #418A8A;
}
112 changes: 112 additions & 0 deletions code/less.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
@media screen and (device-aspect-ratio: 16/9) { }
@media screen and (device-aspect-ratio: 1280/720) { }
@media screen and (device-aspect-ratio: 2560/1440) { }

html:lang(fr-be)

tr:nth-child(2n+1) /* represents every odd row of an HTML table */

img:nth-of-type(2n+1) { float: right; }
img:nth-of-type(2n) { float: left; }

body > h2:not(:first-of-type):not(:last-of-type)

html|*:not(:link):not(:visited)
*|*:not(:hover)
p::first-line { text-transform: uppercase }

@namespace foo url(http://www.example.com);
foo|h1 { color: blue } /* first rule */

span[hello="Ocean"][goodbye="Land"]

E[foo]{
padding:65px;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
}
button::-moz-focus-inner,
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
padding: 0;
border: 0;
}
.btn {
// reset here as of 2.0.3 due to Recess property order
border-color: #ccc;
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
}
fieldset span button, fieldset span input[type="file"] {
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
}

.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}

@import url("something.css");

@light-blue: hsl(190, 50%, 65%);

#menu {
position: absolute;
width: 100%;
z-index: 3;
clear: both;
display: block;
background-color: @blue;
height: 42px;
border-top: 2px solid lighten(@alpha-blue, 20%);
border-bottom: 2px solid darken(@alpha-blue, 25%);
.box-shadow(0, 1px, 8px, 0.6);
-moz-box-shadow: 0 0 0 #000; // Because firefox sucks.

&.docked {
background-color: hsla(210, 60%, 40%, 0.4);
}
&:hover {
background-color: @blue;
}

#dropdown {
margin: 0 0 0 117px;
padding: 0;
padding-top: 5px;
display: none;
width: 190px;
border-top: 2px solid @medium;
color: @highlight;
border: 2px solid darken(@medium, 25%);
border-left-color: darken(@medium, 15%);
border-right-color: darken(@medium, 15%);
border-top-width: 0;
background-color: darken(@medium, 10%);
ul {
padding: 0px;
}
li {
font-size: 14px;
display: block;
text-align: left;
padding: 0;
border: 0;
a {
display: block;
padding: 0px 15px;
text-decoration: none;
color: white;
&:hover {
background-color: darken(@medium, 15%);
text-decoration: none;
}
}
}
.border-radius(5px, bottom);
.box-shadow(0, 6px, 8px, 0.5);
}
}
29 changes: 29 additions & 0 deletions code/sass.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Variable Definitions
$page-width: 800px
$sidebar-width: 200px
$primary-color: #eeeeee

// Global Attributes
body
font:
family: sans-serif
size: 30em
weight: bold

// Scoped Styles
#contents
width: $page-width
#sidebar
float: right
width: $sidebar-width
#main
width: $page-width - $sidebar-width
background: $primary-color
h2
color: blue

#footer
height: 200px
116 changes: 116 additions & 0 deletions code/scss.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/* Some example SCSS */

@import "compass/css3";
$variable: #333;

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
#nested {
background-color: black;
}
border-color: $blue;
color:
darken($blue, 9%);
}

.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}

@mixin table-base {
th {
text-align: center;
font-weight: bold;
}
td, th {padding: 2px}
}

table.hl {
margin: 2em 0;
td.ln {
text-align: right;
}
}

li {
font: {
family: serif;
weight: bold;
size: 1.2em;
}
}

@mixin left($dist) {
float: left;
margin-left: $dist;
}

#data {
@include left(10px);
@include table-base;
}

.source {
@include flow-into(target);
border: 10px solid green;
margin: 20px;
width: 200px; }

.new-container {
@include flow-from(target);
border: 10px solid red;
margin: 20px;
width: 200px; }

body {
margin: 0;
padding: 3em 6em;
font-family: tahoma, arial, sans-serif;
color: #000;
}

@mixin yellow() {
background: yellow;
}

.big {
font-size: 14px;
}

.nested {
@include border-radius(3px);
@extend .big;
p {
background: whitesmoke;
a {
color: red;
}
}
}

#navigation a {
font-weight: bold;
text-decoration: none !important;
}

h1 {
font-size: 2.5em;
}

h2 {
font-size: 1.7em;
}

h1:before, h2:before {
content: "::";
}

code {
font-family: courier, monospace;
font-size: 80%;
color: #418A8A;
}
65 changes: 65 additions & 0 deletions code/stylus.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* Stylus mode */

#id,
.class,
article
font-family Arial, sans-serif

#id,
.class,
article {
font-family: Arial, sans-serif;
}

// Variables
font-size-base = 16px
line-height-base = 1.5
font-family-base = "Helvetica Neue", Helvetica, Arial, sans-serif
text-color = lighten(#000, 20%)

body
font font-size-base/line-height-base font-family-base
color text-color

body {
font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333;
}

// Variables
link-color = darken(#428bca, 6.5%)
link-hover-color = darken(link-color, 15%)
link-decoration = none
link-hover-decoration = false

// Mixin
tab-focus()
outline thin dotted
outline 5px auto -webkit-focus-ring-color
outline-offset -2px

a
color link-color
if link-decoration
text-decoration link-decoration
&:hover
&:focus
color link-hover-color
if link-hover-decoration
text-decoration link-hover-decoration
&:focus
tab-focus()

a {
color: #3782c4;
text-decoration: none;
}
a:hover,
a:focus {
color: #2f6ea7;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}

0 comments on commit 924a365

Please sign in to comment.