mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
Better comments
Also introduces a new format of file opening comment, to outline what happens and a contents list.
This commit is contained in:
parent
d314727506
commit
be976485ad
3 changed files with 68 additions and 21 deletions
|
@ -1,6 +1,26 @@
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// Icons
|
||||||
//
|
//
|
||||||
// Pictos, by Drew Wilson - http://pictos.cc/
|
// Defined the @font-face rule for the icon font, as well as
|
||||||
|
// the base styles for when using icons.
|
||||||
|
// Includes the mixins for adding icons directly and the
|
||||||
|
// variables for each icon.
|
||||||
|
//
|
||||||
|
// * Font-face rule
|
||||||
|
// * Base styled for icons
|
||||||
|
// * Base styled for icons
|
||||||
|
// * The Icon (before) Mixin
|
||||||
|
// * The Icon (after) Mixin
|
||||||
|
// * Icon Variables
|
||||||
|
// * Icon Class Styles
|
||||||
|
// * Icon Classes
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Font-face rule
|
||||||
// Icon-font is generated by http://icomoon.co
|
// Icon-font is generated by http://icomoon.co
|
||||||
|
// Pictos, by Drew Wilson - http://pictos.cc/
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -15,9 +35,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// The Icon (before) Mixin
|
// Base styled for icons
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
%icon-base {
|
%icon-base {
|
||||||
|
@ -85,8 +104,7 @@
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// For accessibility, icon characters in the icon font are stored in Unicode's
|
// For accessibility, icon characters in the icon font are stored in Unicode's
|
||||||
// Private Use Area characters. This means that screen readers won't attempt to
|
// Private Use Area characters. This means that screen readers won't attempt to
|
||||||
// read them out loud. For code maintainability, we then store these Unicode
|
// read them out loud.
|
||||||
// references inside Sass variables.
|
|
||||||
//
|
//
|
||||||
|
|
||||||
// Placeholder
|
// Placeholder
|
||||||
|
|
|
@ -1,15 +1,29 @@
|
||||||
//
|
// ------------------------------------------------------------
|
||||||
// Mixins
|
// Mixins
|
||||||
|
//
|
||||||
|
// Mixins defined here are very general and used in mul
|
||||||
|
//
|
||||||
|
// * baseline()
|
||||||
|
// * clearfix()
|
||||||
|
// * tab-focus()
|
||||||
|
// * triangle()
|
||||||
|
// * set-triangle-color()
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Baseline margin
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// Baseline margin
|
|
||||||
@mixin baseline {
|
@mixin baseline {
|
||||||
margin: 1.6em 0;
|
margin: 1.6em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Fix for clearing float-based overflows
|
// Fix for clearing float-based overflows
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
@mixin clearfix {
|
@mixin clearfix {
|
||||||
&:after {
|
&:after {
|
||||||
content: "";
|
content: "";
|
||||||
|
@ -19,8 +33,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// WebKit-style focus
|
// WebKit-style focus
|
||||||
// From Bootstrap
|
// From Bootstrap
|
||||||
|
// --------------------------------------------------
|
||||||
@mixin tab-focus() {
|
@mixin tab-focus() {
|
||||||
// Default
|
// Default
|
||||||
outline: thin dotted;
|
outline: thin dotted;
|
||||||
|
@ -30,8 +46,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Simple SCSS mixin to create CSS triangles
|
// Simple SCSS mixin to create CSS triangles
|
||||||
// Example: @include css-triangle (10px, #fff, "up");
|
// Example: @include css-triangle (10px, #fff, "up");
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
@mixin triangle($size: 20px, $color: #000, $direction: "down", $type: "normal") {
|
@mixin triangle($size: 20px, $color: #000, $direction: "down", $type: "normal") {
|
||||||
$verticalSize: $size;
|
$verticalSize: $size;
|
||||||
width: 0;
|
width: 0;
|
||||||
|
@ -42,33 +61,36 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $direction == "down" {
|
@if $direction == "down" {
|
||||||
border-left: $size solid #{setTriangleColor($direction, "left", $color)};
|
border-left: $size solid #{set-triangle-color($direction, "left", $color)};
|
||||||
border-right: $size solid #{setTriangleColor($direction, "right", $color)};
|
border-right: $size solid #{set-triangle-color($direction, "right", $color)};
|
||||||
border-top: $verticalSize solid #{setTriangleColor($direction, "top", $color)};
|
border-top: $verticalSize solid #{set-triangle-color($direction, "top", $color)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $direction == "up" {
|
@if $direction == "up" {
|
||||||
border-left: $size solid #{setTriangleColor($direction, "left", $color)};
|
border-left: $size solid #{set-triangle-color($direction, "left", $color)};
|
||||||
border-right: $size solid #{setTriangleColor($direction, "right", $color)};
|
border-right: $size solid #{set-triangle-color($direction, "right", $color)};
|
||||||
border-bottom: $verticalSize solid #{setTriangleColor($direction, "bottom", $color)};
|
border-bottom: $verticalSize solid #{set-triangle-color($direction, "bottom", $color)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $direction == "left" {
|
@if $direction == "left" {
|
||||||
border-right: $verticalSize solid #{setTriangleColor($direction, "right", $color)};
|
border-right: $verticalSize solid #{set-triangle-color($direction, "right", $color)};
|
||||||
border-top: $size solid #{setTriangleColor($direction, "top", $color)};
|
border-top: $size solid #{set-triangle-color($direction, "top", $color)};
|
||||||
border-bottom: $size solid #{setTriangleColor($direction, "bottom", $color)};
|
border-bottom: $size solid #{set-triangle-color($direction, "bottom", $color)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@if $direction == "right" {
|
@if $direction == "right" {
|
||||||
border-left: $verticalSize solid #{setTriangleColor($direction, "left", $color)};
|
border-left: $verticalSize solid #{set-triangle-color($direction, "left", $color)};
|
||||||
border-bottom: $size solid #{setTriangleColor($direction, "bottom", $color)};
|
border-bottom: $size solid #{set-triangle-color($direction, "bottom", $color)};
|
||||||
border-top: $size solid #{setTriangleColor($direction, "top", $color)};
|
border-top: $size solid #{set-triangle-color($direction, "top", $color)};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Utility function to return the relevant colour depending on what type of arrow it is
|
// Utility function to return the relevant colour depending on what type of arrow it is
|
||||||
@function setTriangleColor($direction, $side, $color) {
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
@function set-triangle-color($direction, $side, $color) {
|
||||||
@if $direction == "left" and $side == "right"
|
@if $direction == "left" and $side == "right"
|
||||||
or $direction == "right" and $side == "left"
|
or $direction == "right" and $side == "left"
|
||||||
or $direction == "down" and $side == "top"
|
or $direction == "down" and $side == "top"
|
||||||
|
|
|
@ -7,7 +7,10 @@
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Colours
|
// Colours
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
$darkgrey: #242628;
|
$darkgrey: #242628;
|
||||||
$grey: #35393b;
|
$grey: #35393b;
|
||||||
$midgrey: #7d878a;
|
$midgrey: #7d878a;
|
||||||
|
@ -22,6 +25,7 @@ $orange: #F2A925;
|
||||||
$green: #9FBB58;
|
$green: #9FBB58;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Default style values
|
// Default style values
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
@ -33,7 +37,10 @@ $font-family: 'Open Sans', sans-serif;
|
||||||
$font-family-mono: monospace;
|
$font-family-mono: monospace;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// Dropdown & Popover triangles
|
// Dropdown & Popover triangles
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
$dropdown_triangle: 8px;
|
$dropdown_triangle: 8px;
|
||||||
$popover_triangle: 14px;
|
$popover_triangle: 14px;
|
||||||
$popover_triangle_shallow_multiplier: 0.8; // Adjusts the height of the triangle relative to its width, so it's 0.8x the height of the width
|
$popover_triangle_shallow_multiplier: 0.8; // Adjusts the height of the triangle relative to its width, so it's 0.8x the height of the width
|
Loading…
Reference in a new issue