Skip to content

Instantly share code, notes, and snippets.

@scumah
Last active December 29, 2015 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scumah/7682811 to your computer and use it in GitHub Desktop.
Save scumah/7682811 to your computer and use it in GitHub Desktop.
@import url(http://yui.yahooapis.com/3.14.0/build/cssreset/cssreset-min.css);
@import url(http://fonts.googleapis.com/css?family=Signika+Negative:300,400,600);
// Adding source for resulting CSS:
/* Compiled from https://gist.github.com/scumah/7682811 */
/* Please refer to that file */
// General styles
// --------------
html {
height: 100%;
}
body {
.icon-full(@icon-question-sign, 35px);
position: relative;
padding: 70px 10px 10px;
min-height: 100%;
background-color: @main-bg-color;
color: @text-color;
font-weight: 300;
font-family: Signika Negative;
&:before {
position: fixed;
bottom: 23px;
left: 10px;
color: lighten(@text-color, 30%);
text-shadow: 0 1px 1px #FFF, 0 -1px 1px rgba(0, 0, 0, 0.6);
}
&:after {
.box-sizing(border-box);
position: fixed;
bottom: 10px;
left: 50px;
padding: 5px 10px;
height: 30px;
border-radius: 3px;
background-color: @secondary-bg-color;
box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.1);
content: "handcrafted by scumah";
text-shadow: 0 1px 0px #FFF;
font-size: 14px;
line-height: 21px;
}
}
a {
.transition(all .1s ease-in);
color: @link-color;
text-decoration: none;
&:hover {
color: @link-hover-color;
}
}
.button {
.button();
}
[class*="fontawesome-"]:before {
font-family: 'FontAwesome', sans-serif;
}
// Specific styles
// ---------------
.header {
.icon-full(@icon-heart);
position: fixed;
top: 0;
left: 0;
z-index: 99;
padding: 10px;
width: 100%;
background-color: @secondary-bg-color;
box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
&:before {
.transition(all 1s cubic-bezier(.03, .42, 0, 1));
position: absolute;
top: 10px;
left: 10px;
font-size: 31px;
}
&:hover:before {
.transform-scale(1.2);
color: @main-accent-color;
}
ul {
margin-left: 30px;
list-style-type: none;
li {
float: left;
a {
.icon();
display: inline-block;
border-radius: 4px;
margin-right: 20px;
padding: 5px 10px;
background-color: @secondary-text-color;
font-weight: 400;
&#header-home {
.icon-lite(@icon-home);
}
&#header-profile {
.icon-lite(@icon-user);
}
&#header-settings {
.icon-lite(@icon-cog);
}
&#header-templates {
.icon-lite(@icon-edit);
}
&#header-logout {
.icon-lite(@icon-off);
&:before {
color: @link-hover-color;
}
}
&:hover, &.active-link {
background-color: @link-hover-color;
color: @secondary-text-color;
&:before {
color: @secondary-text-color !important;
}
}
}
&:nth-child(5) {
float: right;
}
}
}
}
.sidebar {
border-radius: 3px;
background-color: @secondary-text-color;
box-shadow: 0 0px 2px rgba(0, 0, 0, .2);
.userbox {
.name {
border-bottom: 1px solid darken(@main-accent-color, 20%);
a {
display: block;
padding: 10px;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
background-color: @link-hover-color;
color: @secondary-text-color;
img {
.transition(box-shadow .2s ease-in);
border-radius: 50px;
display: block;
}
br {
display: none;
}
span {
padding-left: 10px;
line-height: 32px;
}
&:hover {
background-color: darken(@main-accent-color, 5%);
}
}
}
.counters {
padding: 10px;
& > div {
.number {
.icon();
&:before {
color: @main-accent-color !important;
}
}
.description {
display: none;
}
&:nth-child(1) .number {
.icon-lite(@icon-twitter-sign);
}
&:nth-child(2) .number {
.icon-lite("@");
&:before {
vertical-align: baseline;
font-weight: 600;
font-family: Signika Negative;
}
}
&:nth-child(3) .number {
.icon-lite(@icon-plus);
}
}
}
}
form {
padding: 10px;
textarea {
.box-sizing(border-box);
padding: 5px;
width: 100%;
height: 90px;
border: 1px solid lighten(@secondary-accent-color, 15%);
border-radius: 3px;
background-color: lighten(@secondary-accent-color, 48%);
&:focus {
outline: none;
border-color: darken(@secondary-accent-color, 10%)
}
}
.button {
width: 100%;
&:focus {
outline: none;
background-color: darken(@secondary-accent-color, 10%)
}
}
}
.recommended-follows {
padding: 10px;
.title {
margin-bottom: 10px;
border-bottom: 1px solid lighten(@main-accent-color, 30%);
}
.users {
img {
margin-right: 1px;
border-radius: 50px;
}
}
}
}
.big-section {
position: relative;
overflow: hidden;
padding: 0;
border-radius: 3px;
background-color: @secondary-text-color;
box-shadow: 0 0px 2px rgba(0, 0, 0, .2);
h2 {
margin: 20px 0 30px 20px;
border-bottom: 1px solid #FFF;
box-shadow: 0px 1px 0 fade(#000, 6%);
color: @secondary-accent-color;
text-shadow: 0px 2px 0 darken(@secondary-accent-color, 15%), 0px 5px 3px rgba(0,0,0,0.15);
font-size: 60px;
&:after {
.animated();
.bounceIn();
display: inline-block;
margin-left: 10px;
width: 1em;
vertical-align: top;
text-align: center;
font-weight: normal;
font-style: normal;
font-size: 35px;
font-family: FontAwesome;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
&.tweet-list {
h2:after {
content: @icon-twitter-sign;
}
}
.tweet {
.transition(all .1s ease-in);
position: relative;
padding: 10px;
border-bottom: 1px solid darken(@secondary-text-color, 7%);
background-color: @secondary-text-color;
&:nth-child(2n+1) {
background-color:darken(@secondary-text-color, 3%);
}
.avatar {
a, img {
display: block;
}
img {
border-radius: 50px;
}
}
.author {
margin-bottom: 5px;
}
.timespan {
position: absolute;
top: 10px;
right: 10px;
a {
color: lighten(@text-color, 23%)
}
}
&:hover {
background-color: lighten(@main-accent-color, 38%);
}
&:last-child {
border-bottom: 0;
}
}
.profile {
position: relative;
overflow: auto;
background-image: url(http://pipsum.com/900x400.jpg);
background-position: center;
-webkit-background-size: cover;
background-size: cover;
text-align: center;
.avatar img {
border-radius: 50px;
margin-top: 20px;
}
h1 {
position: absolute;
top: 10px;
left: 20px;
color: #FFF;
text-shadow: 0px 1px 1px darken(#FFF, 75%);
font-size: 20px;
}
h2 {
box-shadow: none;
margin: 0 0 20px;
border-bottom: 0;
color: #FFF;
text-shadow: 0px 2px 0 darken(#FFF, 55%), 0px 5px 3px rgba(0,0,0,0.15);
line-height: 30px;
}
p {
margin: 0 20px;
color: white;
text-shadow: 0px 1px 1px darken(#FFF, 75%);
a {
color: lighten(@secondary-accent-color, 30%);
&:hover {
color: #FFF;
}
}
}
.counters {
padding: 10px;
margin: 20px 8% 10px;
border-radius: 3px;
background-color: @secondary-text-color;
box-shadow: 0 1px 3px rgba(0, 0, 0, .6);
.grid-25 {
border-right: 1px solid darken(@secondary-text-color, 7%);
border-left: 1px solid #FFF;
&:first-child {
border-left: 0;
}
&:nth-child(4) {
border-right: 0;
}
}
.follow-button {
line-height: 200%;
&.unfollow {
background-color: @main-accent-color;
}
}
}
}
.tweets > h3, .profile ~ h2 {
margin: 20px 0 10px 20px;
border-bottom: 1px solid #FFF;
box-shadow: 0px 1px 0 fade(#000, 6%);
color: @secondary-accent-color;
text-shadow: 0px 2px 0 darken(@secondary-accent-color, 15%), 0px 5px 3px rgba(0,0,0,0.15);
font-size: 48px;
}
.usersgrid {
padding: 10px;
text-align: center;
img {
border-radius: 50px;
}
}
a[href="http://twittard.piradoiv.com/templates/add"] {
.button();
margin: 0 0 20px 20px;
display: inline-block;
& ~ ul {
position: relative;
padding: 10px;
&:before, &:after {
position: absolute;
top: -50px;
font-size: 13px;
right: 20px;
content: "Las plantillas que ya has probado tienen el botón en verde";
color: @secondary-accent-color;
}
&:after {
top: -30px;
color: @main-accent-color;
content: "Y las que no has probado tienen el botón en rosa";
}
.template-holder {
position: relative;
width: 32.333333%;
margin: 0 1% 10px 0;
padding: 10px;
background-color: lighten(@secondary-bg-color, 5%);
border: 1px solid @secondary-bg-color;
&:after {
position: absolute;
top: -1px;
right: -1px;
display: block;
width: 0;
border-width: 0 25px 25px 0;
border-style: solid;
border-color: @secondary-text-color @secondary-text-color darken(@secondary-bg-color, 0%);
background: #FCA20D;
content: "";
}
&:nth-child(1), &:nth-child(2), &:nth-child(3) {
.template h3 {
.icon-full(@icon-trophy);
font-size: 25px;
}
}
&:nth-child(1) .template h3:before {
color: #FFDB19!important;
}
&:nth-child(2) .template h3:before {
color: #ACACAC!important;
}
&:nth-child(3) .template h3:before {
color: #665D1E!important;
}
.template h3 {
.ellipsis();
margin-bottom: 5px;
font-size: 20px;
}
&:nth-child(3) {
margin-right: 0;
}
.template-author {
a[href="http://twittard.piradoiv.com/@scumah"] {
.icon-full(@icon-heart);
&:before {
color: @main-accent-color;
}
}
}
.template-actions {
a {
&:first-child {
.button();
display: inline-block;
margin-top: 5px;
background-color: @main-accent-color;
&:visited {
background-color: @secondary-accent-color;
&:hover {
background-color: darken(@secondary-accent-color, 10%)
}
}
&:hover {
background-color: darken(@main-accent-color, 10%)
}
}
&:nth-child(2) {
.transition(all .2s ease-in);
position: absolute;
top: 5px;
right: 35px;
color: transparent;
}
}
}
.template-stats {
div {
.ellipsis();
.icon();
.transition(all .2s ease-in);
position: absolute;
right: -155px;
bottom: 40px;
width: 190px;
border-radius: 20px;
color: transparent;
line-height: 35px;
cursor: pointer;
border: 1px solid transparent;
&:before {
color: @main-accent-color!important;
}
&:hover {
box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.3);
color: @text-color;
z-index: 99;
border: 1px solid @main-accent-color;
background-color: #FFF;
}
}
div:first-child {
.icon-lite(@icon-download-alt);
bottom: 5px;
}
div:last-child {
.icon-lite(@icon-indent-left);
}
}
&:nth-child(3n) .template-stats div {
right: -5px;
width: auto;
&:before {
float: right;
margin-left: 10px;
line-height: 37px;
}
&:hover {
width: auto;
}
}
&:hover .template-actions a:nth-child(2) {
color: @secondary-accent-color;
}
}
}
}
& > form {
margin: 20px;
label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
input[type="text"], textarea {
.box-sizing(border-box);
.transition(all .2s ease-in);
padding: 5px;
border: 1px solid lighten(@secondary-accent-color, 15%);
border-radius: 3px;
background-color: lighten(@secondary-accent-color, 48%);
margin-bottom: 20px;
&:focus {
outline: none;
border-color: darken(@secondary-accent-color, 10%)
}
}
input[type="text"] {
min-width: 200px;
width: 50%;
font-size: 15px;
}
textarea {
width: 100%;
height: 90px;
}
input.button {
display: block;
font-size: 20px;
&:focus {
outline: none;
background-color: darken(@secondary-accent-color, 10%)
}
}
br {
display: none;
}
&[action^="http://twittard.piradoiv.com/templates/update/"] {
& ~ h3 {
margin: 40px 20px 0;
border-bottom: 1px solid #FFF;
box-shadow: 0px 1px 0 fade(#000, 6%);
color: @secondary-accent-color;
text-shadow: 0px 2px 0 darken(@secondary-accent-color, 15%), 0px 5px 3px rgba(0,0,0,0.15);
font-size: 32px;
}
& ~ a {
.button();
display: inline-block;
margin: 20px;
font-size: 20px;
&:focus {
outline: none;
background-color: darken(@secondary-accent-color, 10%)
}
}
& ~ ul {
overflow: hidden;
margin: 0 0 20px 20px;
li {
float: left;
margin-right: 20px;
a {
.icon-full(@icon-pencil);
}
}
}
}
.CodeMirror {
margin: 0 0 20px 10px;
border: 1px solid lighten(@secondary-accent-color, 15%);
border-radius: 3px;
& ~ p input {
margin-left: 10px;
}
}
}
a[href^="http://twittard.piradoiv.com/templates/delete_css/"] {
.icon-full(@icon-remove);
position: absolute;
right: 20px;
bottom: 28px;
color: @main-accent-color;
}
& > a[href^="http://twittard.piradoiv.com/templates/edit/"] {
.icon-full(@icon-arrow-left);
position: absolute;
right: 20px;
top: 60px;
color: @text-color;
&:hover {
color: @main-accent-color;
}
}
}
.animated() {
-webkit-animation-fill-mode:both;
-moz-animation-fill-mode:both;
-ms-animation-fill-mode:both;
-o-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-animation-duration:.8s;
-moz-animation-duration:.8s;
-ms-animation-duration:.8s;
-o-animation-duration:.8s;
animation-duration:.8s;
-webkit-animation-delay:.8s;
-moz-animation-delay:.8s;
-ms-animation-delay:.8s;
-o-animation-delay:.8s;
animation-delay:.8s;
}
@-webkit-keyframes bounceIn {
0% { opacity: 0; -webkit-transform: scale(.3); }
50% { opacity: 1; -webkit-transform: scale(1.05); }
70% { -webkit-transform: scale(.9); }
100% { -webkit-transform: scale(1); }
}
@-moz-keyframes bounceIn {
0% { opacity: 0; -moz-transform: scale(.3); }
50% { opacity: 1; -moz-transform: scale(1.05); }
70% { -moz-transform: scale(.9); }
100% { -moz-transform: scale(1) }
}
@-o-keyframes bounceIn {
0% { opacity: 0; -o-transform: scale(.3); }
50% { opacity: 1; -o-transform: scale(1.05); }
70% { -o-transform: scale(.9); }
100% { -o-transform: scale(1); }
}
@keyframes bounceIn {
0% { opacity: 0; transform: scale(.3); }
50% { opacity: 1; transform: scale(1.05); }
70% { transform: scale(.9); }
100% { transform: scale(1); }
}
.bounceIn() {
-webkit-animation-name: bounceIn;
-moz-animation-name: bounceIn;
-o-animation-name: bounceIn;
animation-name: bounceIn;
}
// Mixins import and variables
// ----------------------------
@main-bg-color: lighten(#D1EEFC, 6%);
@secondary-bg-color: #D1EEFC;
@main-accent-color: #FF2D55;
@secondary-accent-color: #16D6D9;
@text-color: lighten(#1F1F21, 30%);
@secondary-text-color: #FDFDFD;
@link-color: #1F1F21;
@link-hover-color: @main-accent-color;
.button() {
.transition(all .1s ease-in);
padding: 3px 7px;
border: 0;
border-bottom: 2px solid fade(#000, 20%);
border-radius: 3px;
background-color: @secondary-accent-color;
color: @secondary-text-color;
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.2);
cursor: pointer;
&:hover {
background-color: darken(@secondary-accent-color, 10%)
}
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.transition(@transition) {
transition: @transition;
-ms-transition: @transition;
-moz-transition: @transition;
-webkit-transition: @transition;
}
.box-sizing(@box-sizing) {
box-sizing: @box-sizing;
-moz-box-sizing: @box-sizing;
}
.transform-scale(@scale) {
transform: scale(@scale);
-ms-transform: scale(@scale);
-webkit-transform: scale(@scale);
}
@charset 'UTF-8';
@font-face {
font-family: 'FontAwesome';
font-style: 'normal';
font-weight: 'normal';
src: url('http://weloveiconfonts.com/api/fonts/fontawesome/fontawesome-webfont.eot');
src: url('http://weloveiconfonts.com/api/fonts/fontawesome/fontawesome-webfont.eot?#iefix') format('eot'),
url('http://weloveiconfonts.com/api/fonts/fontawesome/fontawesome-webfont.woff') format('woff'),
url('http://weloveiconfonts.com/api/fonts/fontawesome/fontawesome-webfont.ttf') format('truetype'),
url('http://weloveiconfonts.com/api/fonts/fontawesome/fontawesome-webfont.svg#FontAwesomeRegular') format('svg');
}
// https://github.com/FortAwesome/Font-Awesome/pull/53
// .icon base class to use with .icon-lite() mixin
.icon {
&:before {
display: inline-block;
vertical-align: middle;
text-align: center;
font-weight: normal;
font-style: normal;
font-family: FontAwesome;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
// .icon-full mixin, adds an icon to any css selector
.icon-full(@type, @size: 1, @position: before, @color: inherit, @margin: 0.2em) {
&:before {
display: inline-block;
margin-right: @margin;
width: 1em;
color: @color;
content: @type;
vertical-align: middle;
text-align: center;
font-weight: normal;
font-style: normal;
font-size: @size * 1em;
font-family: FontAwesome;
line-height: 1em;
line-height: 1em / @size;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
// .icon-lite mixin, like .icon-full(), but less code and requires .icon class on all html elements that use it
.icon-lite(@type, @size: 1, @color: inherit, @margin: 0.2em) {
&:before {
margin-right: @margin;
color: @color;
content: @type;
font-size: @size * 1em;
line-height: 1em / @size;
}
}
//variables to use with the .icon() mixin.
@icon-heart: "\f004";
@icon-user: "\f007";
@icon-remove: "\f00d";
@icon-off: "\f011";
@icon-cog: "\f013";
@icon-home: "\f015";
@icon-download-alt: "\f019";
@icon-pencil: "\f040";
@icon-edit: "\f044";
@icon-question-sign: "\f059";
@icon-arrow-left: "\f060";
@icon-plus: "\f067";
@icon-indent-left: "\f03b";
@icon-twitter-sign: "\f081";
@icon-trophy: "\f091";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment