Skip to content

Instantly share code, notes, and snippets.

@Saminou24
Created October 14, 2013 12:13
Show Gist options
  • Save Saminou24/6974683 to your computer and use it in GitHub Desktop.
Save Saminou24/6974683 to your computer and use it in GitHub Desktop.
A Pen by Alexis Sgarbossa.
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Google UI with Compass</title>
<link rel="stylesheet" media="all" href="stylesheets/screen.css" type="text/css">
</head>
<body>
<div id="wrapper">
<header>
<h1>Google UI with Compass</h1>
<p>Simple &amp; semantic google UI recreation</p>
</header>
<section id="ui">
<ul class="interface">
<li class="first">
<a href="#">Archive</a>
</li>
<li>
<a href="#">Spam</a>
</li>
<li>
<a href="#">Delete</a>
</li>
<li class="last">
<a href="#">Mark as read</a>
</li>
</ul>
<ul class="interface">
<li class="first">
<span>
<a class="icon plus" href="#">+</a>
</span>
</li>
<li class="last">
<span>
<a class="icon less" href="#">-</a>
</span>
</li>
</ul>
<ul class="interface">
<li class="first">
<a class="move" href="#">Move To</a>
</li>
<li class="last">
<a class="label" href="#">Labels</a>
</li>
</ul>
<ul class="interface">
<li class="unique">
<a class="more" href="#">More</a>
</li>
</ul>
<ul class="interface">
<li class="unique">
<span>
<a class="refresh" href="#">Reload</a>
</span>
</li>
</ul>
</section>
</div>
</body>
</html>
@import "compass"
// Utilities --------------------------------------------------------------
@import compass/utilities
@import compass/css3
@import compass/utilities/general/clearfix
@import compass/reset
$base-font-size: 12px
@import compass/typography/vertical_rhythm
$border: #818181
$gradient_start: whitesmoke
$gradient_end: #f1f1f1
// Grid BG ---------------------------------------------------------
body
background: none repeat scroll 0 0 #fafafa
color: #333
font-family: "Helvetica Neue",Arial,Helvetica,sans-serif
font-size: 75%
line-height: $base-rhythm-unit
html > body
font-size: $base-font-size
a
color: darken($border, 20%)
&:hover
color: lighten($border, 20%)
// Commons ---------------------------------------------------------
h1,h2,h3,h4,h5,h6
font-weight: normal
color: #111
h1, .lh1
+adjust-font-size-to(32px)
+margin-leader(1, 32px)
h2, .lh2
+adjust-font-size-to(26px)
+margin-leader(1, 26px)
p,ul, ol, dl,
margin: 0 0 1.5em
ul, ol
margin-left: 1.5em
// Layout ---------------------------------------------------------
#wrapper
width: 950px
margin: 0 auto
overflow: hidden
header
margin-bottom: 4em
text-transform: uppercase
text-align: center
#ui
margin-left: 5em
// Google UI --------------------------------------------------------
.interface
+horizontal-list-container
+inline-block
margin-right: 2em
li
background: $gradient_start
border-bottom: 1px solid lighten($border, 35%)
border-top: 1px solid lighten($border, 35%)
border-left: 1px solid lighten($border, 35%)
+horizontal-list-item(0, left)
cursor: pointer
+background-image(linear-gradient(top, $gradient_start, $gradient_end 100%))
+box-shadow(0 1px 2px rgba(0, 0, 0, 0.05) inset)
&:hover
border-bottom: 1px solid $border
border-top: 1px solid $border
border-left: 1px solid $border
li:hover+li
border-left: 1px solid $border
//* Adjacent selectors rulez! **
a
color: darken($border, 10%)
padding: 2px 12px
text-decoration: none
font-weight: 700
display: inline-block
margin: 0 0 0 4px
+text-shadow(white, 0, 1px, 0)
span
+inline-block
padding: 2px 8px
.first
border-right: 0
+border-radius(2px 0 0 2px)
.last
+border-radius(0 2px 2px 0)
border-right: 1px solid lighten($border, 35%)
&:hover
border-right: 1px solid $border
.unique
+border-radius(2px)
margin-left: 0
border-right: 1px solid lighten($border, 35%)
&:hover
border-right: 1px solid $border
.icon
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAABQCAYAAABveuf8AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAEZ0FNQQAAsY58+1GTAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOxAAADsQBlSsOGwAACVVJREFUeNrVWg9sE9cZf3e+pE5lp4FGaxIoRRUrW9OpSexMsIEUD1jpxKROXUSjjZVskASSSSABDdI6ov1LYEhjagNJiJSitKJVWqnToBSNKmFkgip2kqqkyhASbtcl2Ui7gE1i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rmq+ytUwu+iMRceUH6eUmUCqNuAEU10RUXOxfly1C8oYG5KjAh/LQR2gpecLOiyI4b+Y4DbdWPsofOxAImbHv8CPnmapzjJkFBmNJdnaVQE2s2Q+LX4LlgMvTM/cAyJ8169YU9aUjIj2q4RYM11UbiCt80VUedM5XqJRjKSkvs2Z1pwrQf1eDh+msubMyVawYrVYkPMCxxJb6pB/qmmeOVpkeEjbfuzyOQjJTUDH8Rb0hEOXgB17QY99Zq1pNa1laQkdq2ZlCAb8kKZTgFwNHUDuBfBoVNQp0hg1HkpXehpNkgEthUgt8ZdrwI1TeO32C+Ge/MSrWGGrBPbGvn2/83ePLJo3N68WHJcoQI8qV6z6N68W/8epb1575dW6W//Wah0T2cHRKyY3puXlKREcVVVqpar0xn6V++ejw9/wj7964e9CDQPKVfSJHTWckZl9v/EvXlmJfR/dY85QBXlV6plfznnOva/3t68pNGT/t68WUsa7c1LFtB5e/MUZdccoLy9ecmaM6Vsb54loOcmNtOytKnGd1a/h1IDFCBpGfu5+vp63Q2qDQ0NEi19Z2VlaSpTc3NzniRJ3ThN/LhAHyE8oLB5q887d+7Mi0QiuveAGYYTCd8BS503ehsAjYiiuAUvtamxsXHe5oHa2toxdEp57bAZkFSOHj06hpfTvCcR5F1lApAQz/T79u0bEwThx6gtALucA9YQpA5YXZBRymxqalIw7FFucrm0V/Z8vtn1KYB8CWA3YRQ8ZGkdN8jhgdRwgxw9kPe09sQrZFnVOqYLWZZ3j6RnOa1y8ODBdRR8qKVa1lzQyV0sqnkNDx06RB+sXket279/f9KViYAGQT3rOFEvybLcCd88BZApUiZBOAwrvYug4irT1NTUD1KlTP8FPflg9HQO/6IAAAAASUVORK5CYII=)
background-repeat: no-repeat
.plus
background-position: 0 -60px
height: 10px
width: 14px
padding: 0
text-indent: -119988px
overflow: hidden
.less
background-position: 0 -70px
height: 10px
width: 14px
padding: 0
text-indent: -119988px
overflow: hidden
.move, .label, .more
position: relative
&:after
background-image: url(data:image/png;base64,iVBORw0KGgoA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xw9kPe09sQrZFnVOqYLWZZ3j6RnOa1y8ODBdRR8qKVa1lzQyV0sqnkNDx06RB+sXket279/f9KViYAGQT3rOFEvybLcCd88BZApUiZBOAwrvYug4irT1NTUD1KlTP8FPflg9HQO/6IAAAAASUVORK5CYII=)
background-repeat: no-repeat
background-position: -18px -70px
content: ""
height: 6px
width: 7px
margin-left: 3px
display: inline-block
.refresh
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAZBJREFUOMtj+P//PwM1McOogdQ3EAmwA7EREGcCcQ0QZwOxAZK6BFIMVGJlZZ3Az89/QVJS8r6CgsIjKSmp+7y8vBeAcl1AXMoA1kqcgeJiYmJLgAa9MTAw+BgTE/OiqKjoUUJCwnNjY+OPgoKCn0CGEW2gnJxcmZKS0isHB4fP27ZtuwQUmwLEtd++fZuUk5PzEGYY0Qbq6OicBuIvEydOvADk28DCgIODIxnZMKIN1NPTewn06ufFixeXIscQUA4UCeiAsIEWFhbvgC78FBkZGcOAHUgDsS0QqxJlYGJi4n11dfWvQLwGqIkNzTBWaWnpNiA+aGVllUeUgRs2bFgIVPwZmEzeApPOZKhrxIDYkpmZeTowBbwwNTV9MWnSpHKiDPzw4YPJ1KlTLzs6On6Wl5d/KSAgcIWNje00Hx/fdWAKeG1pafmlt7cXFPvGxGY9ZiCOOH369IHCwsJnzs7Ob4Eu+mhnZ/chPz//+f79+08DLU0iOesB2epA3ADE64F4PxBvA+ImqMvYRosvOAYAThfjRa6TdnUAAAAASUVORK5CYII=)
background-repeat: no-repeat
background-position: -2px 0
height: 12px
width: 12px
text-indent: -119988px
overflow: hidden
padding: 2px 4px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment