brevis 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/brevis.rb +30 -0
- data/stylesheets/_brevis.sass +34 -0
- data/stylesheets/brevis/README.md +124 -0
- data/stylesheets/brevis/components/README.md +40 -0
- data/stylesheets/brevis/components/chrome/header/_branding.sass +32 -0
- data/stylesheets/brevis/components/chrome/header/_mobile_toggle.sass +24 -0
- data/stylesheets/brevis/components/chrome/header/_primary_menu.sass +66 -0
- data/stylesheets/brevis/components/chrome/header/_search.sass +46 -0
- data/stylesheets/brevis/components/chrome/header/_social.sass +30 -0
- data/stylesheets/brevis/components/content_lists/_content_carousel.sass +0 -0
- data/stylesheets/brevis/components/content_lists/_content_stream.sass +297 -0
- data/stylesheets/brevis/components/content_lists/_featured.sass +80 -0
- data/stylesheets/brevis/components/content_lists/_headlines.sass +5 -0
- data/stylesheets/brevis/components/content_lists/_topic_lists.sass +16 -0
- data/stylesheets/brevis/components/content_modules/_carousel.sass +23 -0
- data/stylesheets/brevis/components/content_modules/_chosen.sass +294 -0
- data/stylesheets/brevis/components/content_modules/_colorbox.sass +208 -0
- data/stylesheets/brevis/components/content_modules/_flexslider.sass +93 -0
- data/stylesheets/brevis/components/content_modules/_sticky_menu.sass +40 -0
- data/stylesheets/brevis/utilities/README.md +16 -0
- data/stylesheets/brevis/utilities/_admin.sass +9 -0
- data/stylesheets/brevis/utilities/_animations.sass +47 -0
- data/stylesheets/brevis/utilities/_breakpoints.sass +59 -0
- data/stylesheets/brevis/utilities/_colors.sass +23 -0
- data/stylesheets/brevis/utilities/_eq.sass +260 -0
- data/stylesheets/brevis/utilities/_font_awesome.scss +540 -0
- data/stylesheets/brevis/utilities/_forms.sass +27 -0
- data/stylesheets/brevis/utilities/_header.sass +19 -0
- data/stylesheets/brevis/utilities/_images.sass +79 -0
- data/stylesheets/brevis/utilities/_layout.sass +119 -0
- data/stylesheets/brevis/utilities/_page.sass +48 -0
- data/stylesheets/brevis/utilities/_tooltip.sass +48 -0
- data/stylesheets/brevis/utilities/_typography.sass +113 -0
- data/stylesheets/brevis/utilities/_z-index.scss +15 -0
- metadata +55 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 764d046619a88b9784d9eb7eacebe6ab72f49e00
|
4
|
+
data.tar.gz: f5268f52bad9a22a4d35bf7c376450f8648d476e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d739ea7f3ff6098d98e8eeae4c1393d381af378b4cdc1d7baced853b8b78846b02f558f5b9ac98ec3944d7e80b7053bf4c0a182d89b897f54ee943282e45eb
|
7
|
+
data.tar.gz: 34450b26433cb46c739daef2c2d378b6d366cc07f4d2d201a595a5a001fdd48c7d26a690578d6568e4435fa332bc10f180f73adaec6189951ffe61b323c84518
|
data/lib/brevis.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# All gems that are required for this extension to work should go here.
|
2
|
+
# These are the requires you would normally put in your config.rb file
|
3
|
+
# By default, you should always included Compass. Do not include your
|
4
|
+
# extension.
|
5
|
+
require 'compass'
|
6
|
+
|
7
|
+
# This tells Compass what your Compass extension is called, and where to find
|
8
|
+
# its files
|
9
|
+
# Replace 'extension' with the name of your extension. Spaces allowed.
|
10
|
+
extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
11
|
+
Compass::Frameworks.register('brevis', :path => extension_path)
|
12
|
+
|
13
|
+
# Version and date of version for your Compass extension.
|
14
|
+
# Replace Extension with the name of your extension
|
15
|
+
# Letters, numbers, and underscores only
|
16
|
+
# Version is a number. If a version contains alphas, it will be created as
|
17
|
+
# a prerelease version
|
18
|
+
# Date is in the form of YYYY-MM-DD
|
19
|
+
module Brevis
|
20
|
+
VERSION = "0.0.4"
|
21
|
+
DATE = "2014-11-03"
|
22
|
+
end
|
23
|
+
|
24
|
+
# This is where any custom SassScript should be placed. The functions will be
|
25
|
+
# available on require of your extension without the need for users to import
|
26
|
+
# any partials. Uncomment below.
|
27
|
+
|
28
|
+
# module Sass::Script::Functions
|
29
|
+
#
|
30
|
+
# end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
@import "compass"
|
2
|
+
|
3
|
+
@import "brevis/utilities/admin.sass"
|
4
|
+
@import "brevis/utilities/animations.sass"
|
5
|
+
@import "brevis/utilities/breakpoints.sass"
|
6
|
+
@import "brevis/utilities/colors.sass"
|
7
|
+
@import "brevis/utilities/eq.sass"
|
8
|
+
@import "brevis/utilities/font_awesome.scss"
|
9
|
+
@import "brevis/utilities/forms.sass"
|
10
|
+
@import "brevis/utilities/header.sass"
|
11
|
+
@import "brevis/utilities/images.sass"
|
12
|
+
@import "brevis/utilities/layout.sass"
|
13
|
+
@import "brevis/utilities/page.sass"
|
14
|
+
@import "brevis/utilities/tooltip.sass"
|
15
|
+
@import "brevis/utilities/typography.sass"
|
16
|
+
@import "brevis/utilities/z-index.scss"
|
17
|
+
|
18
|
+
@import "brevis/components/chrome/header/branding.sass"
|
19
|
+
@import "brevis/components/chrome/header/mobile_toggle.sass"
|
20
|
+
@import "brevis/components/chrome/header/primary_menu.sass"
|
21
|
+
@import "brevis/components/chrome/header/search.sass"
|
22
|
+
@import "brevis/components/chrome/header/social.sass"
|
23
|
+
|
24
|
+
@import "brevis/components/content_lists/content_carousel.sass"
|
25
|
+
@import "brevis/components/content_lists/content_stream.sass"
|
26
|
+
@import "brevis/components/content_lists/featured.sass"
|
27
|
+
@import "brevis/components/content_lists/headlines.sass"
|
28
|
+
@import "brevis/components/content_lists/topic_lists.sass"
|
29
|
+
|
30
|
+
@import "brevis/components/content_modules/carousel.sass"
|
31
|
+
@import "brevis/components/content_modules/chosen.sass"
|
32
|
+
@import "brevis/components/content_modules/colorbox.sass"
|
33
|
+
@import "brevis/components/content_modules/flexslider.sass"
|
34
|
+
@import "brevis/components/content_modules/sticky_menu.sass"
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# Introduction to [Sass](http://sass-lang.com/)
|
2
|
+
Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules,
|
3
|
+
variables, mixins, selector inheritance, and more. It’s translated to well-
|
4
|
+
formatted, standard CSS using the command line tool or a web-framework plugin.
|
5
|
+
|
6
|
+
Sass has two syntaxes. The new main syntax (as of Sass 3) is known as “SCSS”
|
7
|
+
(for “Sassy CSS”), and is a superset of CSS3’s syntax. This means that every
|
8
|
+
valid CSS3 stylesheet is valid SCSS as well. SCSS files use the extension .scss.
|
9
|
+
|
10
|
+
The second, older syntax is known as the indented syntax (or just “Sass”).
|
11
|
+
Inspired by Haml’s terseness, it’s intended for people who prefer conciseness
|
12
|
+
over similarity to CSS. Instead of brackets and semicolons, it uses the
|
13
|
+
indentation of lines to specify blocks. Although no longer the primary syntax,
|
14
|
+
the indented syntax will continue to be supported. Files in the indented syntax
|
15
|
+
use the extension .sass.
|
16
|
+
|
17
|
+
Please refer to the [Sass documentation](http://sass-lang.com/docs.html) for
|
18
|
+
further information about the syntax.
|
19
|
+
|
20
|
+
## Introduction to [Compass](http://compass-style.org/)
|
21
|
+
Compass is an open-source CSS Authoring Framework.
|
22
|
+
|
23
|
+
Please refer to the [Compass documentation](http://compass-style.org/reference)
|
24
|
+
for further information on how to leverage the powerful Compass framework.
|
25
|
+
|
26
|
+
## Compass extensions
|
27
|
+
There are many extensions available for Compass. You can install and use as many
|
28
|
+
of them together or just a single one depending on your use-case. Good examples
|
29
|
+
for useful Compass extensions are "susy" (a responsive grid framework
|
30
|
+
[http://susy.oddbird.net/]) or "compass-rgbapng" (a rgba() .png file generator)
|
31
|
+
but there are many more.
|
32
|
+
|
33
|
+
## Setting up and using Sass and Compass
|
34
|
+
Compass runs on any computer that has
|
35
|
+
[ruby](http://www.ruby-lang.org/en/downloads) installed.
|
36
|
+
|
37
|
+
Once you got ruby installed you can easily install the required gems from the
|
38
|
+
command line:
|
39
|
+
```
|
40
|
+
$ gem update --system
|
41
|
+
$ gem install compass
|
42
|
+
```
|
43
|
+
|
44
|
+
Any additional library can be installed in the same way:
|
45
|
+
```
|
46
|
+
$ gem install compass-rgbapng
|
47
|
+
$ gem install susy
|
48
|
+
```
|
49
|
+
|
50
|
+
Once you have set up your environment you can navigate to the folder that holds
|
51
|
+
your config.rb file.
|
52
|
+
|
53
|
+
The config.rb file is the configuration file that helps Sass and Compass to
|
54
|
+
understand your environment. For example, it defines which folder your .scss
|
55
|
+
or .sass files are stored in or where the generated .css files should be output
|
56
|
+
to.
|
57
|
+
|
58
|
+
Executing the following command will constantly watch for any change in your
|
59
|
+
.scss files and re-compile them into .css:
|
60
|
+
```
|
61
|
+
$ compass watch
|
62
|
+
```
|
63
|
+
|
64
|
+
You can also clear and recompile your .css manually:
|
65
|
+
```
|
66
|
+
$ compass clean
|
67
|
+
$ compass compile
|
68
|
+
```
|
69
|
+
|
70
|
+
## Barebones Sass Structure
|
71
|
+
The barebones CSS structure provided in this starterkit uses many of the ideas
|
72
|
+
discussed in Jonathan [Snook's SMACSS](http://smacss.com) and is intended to
|
73
|
+
provide a starting point for building modular, scalable CSS using Sass and
|
74
|
+
Drupal.
|
75
|
+
|
76
|
+
Multiple Sass partials are used to help organise the styles, these are combined
|
77
|
+
by including them in styles.scss which is compiled into styles.css in the css/
|
78
|
+
directory.
|
79
|
+
|
80
|
+
All styles are included in order of specificity, this means that as you go down
|
81
|
+
the document each section builds upon and inherits sensibly from the previous
|
82
|
+
ones. This results in less undoing of styles, less specificity problems and
|
83
|
+
all-round better architected and lighter stylesheets.
|
84
|
+
|
85
|
+
The file and directory structure contained in this folder looks something like
|
86
|
+
this:
|
87
|
+
|
88
|
+
### Top level files
|
89
|
+
These files are the main entry points for the Sass compiler and shouldn't
|
90
|
+
directly contain any CSS code, instead they only serves to combine the Sass
|
91
|
+
contained in the partials (see below) through @import directives.
|
92
|
+
|
93
|
+
#### nfl-team-base.styles.scss
|
94
|
+
This file aggregates all the components into a single file.
|
95
|
+
|
96
|
+
#### nfl-team-base.normalize.scss
|
97
|
+
This file provides a CSS reset/normalize generated based on the legacy
|
98
|
+
variables.
|
99
|
+
|
100
|
+
#### nfl-team-base.hacks.scss
|
101
|
+
This file may be used to provide temporary hot-fixes for style issues that
|
102
|
+
you plan to properly implement as components at a later point in time or simply
|
103
|
+
don't have a proper solution for yet.
|
104
|
+
|
105
|
+
#### nfl-team-base.no-query.scss
|
106
|
+
This file re-renders the same contents as the styles.scss file but without any
|
107
|
+
media queries. It can be used as a fallback for for older browsers that don't
|
108
|
+
support media queries. You can find more information about this on the
|
109
|
+
github repository of the
|
110
|
+
[breakpoint](https://github.com/Team-Sass/breakpoint/wiki/No-Query-Fallbacks).
|
111
|
+
Compass gem.
|
112
|
+
|
113
|
+
### Partials
|
114
|
+
#### variables
|
115
|
+
This is where you place your Sass variables.
|
116
|
+
|
117
|
+
#### abstractions
|
118
|
+
This is where you place your functions, mixins and extends.
|
119
|
+
|
120
|
+
#### base
|
121
|
+
This is where you place all your basic, raw HTML element styling.
|
122
|
+
|
123
|
+
#### components
|
124
|
+
This is where you place your components.
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Components
|
2
|
+
This directory should contain full components (modules in SMACSS), their
|
3
|
+
sub-components and modifiers.
|
4
|
+
|
5
|
+
Components are discrete parts of your page that should sit within the regions
|
6
|
+
of your layouts. You should try to abstract your components as much as possible
|
7
|
+
to promote reuse throughout the theme. Components should be flexible enough to
|
8
|
+
respond to any width and should never rely on context
|
9
|
+
(e.g. .sidebar-first .component) for styling. This allows modules to be placed
|
10
|
+
throughout the theme with no risk of them breaking.
|
11
|
+
|
12
|
+
If you find you need to change the look of a component depending on it's context
|
13
|
+
you should avoid using context based classes at all costs. Instead it is better
|
14
|
+
to add another "modifier" class to the component to alter the styling. Again,
|
15
|
+
this promotes reuse.
|
16
|
+
|
17
|
+
Sub-components are the individual parts that make up a component. As a general
|
18
|
+
rule, adding a class to target a sub-component is a much better option than
|
19
|
+
using descendant selectors or element selectors. In many cases sub-components
|
20
|
+
can be made more reusable by making them components in their own right, so they
|
21
|
+
can then be used within other components.
|
22
|
+
|
23
|
+
Almost everything that doesn't belong in base should be made a component.
|
24
|
+
|
25
|
+
## Some common examples throughout Drupal
|
26
|
+
|
27
|
+
* Blocks
|
28
|
+
* Content Types
|
29
|
+
For example, you may have a generic node component that contains
|
30
|
+
sub-components for the submitted by line and links. Specific components can
|
31
|
+
then be created for each content type to style the specifics of each. Finally,
|
32
|
+
by using entity view modes you can easily apply modifications based on the
|
33
|
+
.node-[view-mode] classes.
|
34
|
+
* Forms
|
35
|
+
For instance the log in form.
|
36
|
+
* Views
|
37
|
+
Each views output style could be made into a component, the content of each
|
38
|
+
row should be provided by a view mode styled by it's component CSS. Exposed
|
39
|
+
filter forms, views pagers and other views elements are also good candidates
|
40
|
+
for components.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
%site-logo
|
3
|
+
display: block
|
4
|
+
overflow: hidden
|
5
|
+
background: no-repeat 0 0
|
6
|
+
background-size: cover
|
7
|
+
margin: 0 0 $logo-bottom-margin 0
|
8
|
+
font-size: 0
|
9
|
+
line-height: 1
|
10
|
+
height: $mobile-logo-h
|
11
|
+
width: $mobile-logo-w
|
12
|
+
background-image: inline-image("logo_mobile.png")
|
13
|
+
|
14
|
+
+breakpoint($mobile-hi-res)
|
15
|
+
background-image: inline-image("logo_mobile@2x.png")
|
16
|
+
|
17
|
+
+breakpoint($desktop)
|
18
|
+
background-image: inline-image("logo.png")
|
19
|
+
background-size: contain
|
20
|
+
height: $logo-h
|
21
|
+
width: $logo-w
|
22
|
+
|
23
|
+
+breakpoint($desk-hi-res)
|
24
|
+
background-image: inline-image("logo@2x.png")
|
25
|
+
|
26
|
+
+breakpoint($print-media)
|
27
|
+
-webkit-print-color-adjust: exact
|
28
|
+
content: url("../images/logo.png")
|
29
|
+
background-image: none
|
30
|
+
height: $logo-h
|
31
|
+
width: $logo-w
|
32
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
//easily add a mobile menu navicon:
|
3
|
+
%mobile-menu-toggle
|
4
|
+
text-indent: -100%
|
5
|
+
width: $navicon-size - 10px
|
6
|
+
height: $navicon-size
|
7
|
+
display: block
|
8
|
+
margin: 5px
|
9
|
+
padding-left: $navicon-size
|
10
|
+
&:before
|
11
|
+
content: ""
|
12
|
+
position: absolute
|
13
|
+
top: 0
|
14
|
+
left: 0
|
15
|
+
margin: $navicon-margin
|
16
|
+
width: $navicon-size - ($navicon-margin * 2)
|
17
|
+
height: $navicon-size - ($navicon-margin * 2)
|
18
|
+
background: image-url("hamburger_menu.svg") no-repeat
|
19
|
+
background-size: cover
|
20
|
+
|
21
|
+
.modal-content &
|
22
|
+
display: none
|
23
|
+
|
24
|
+
|
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
//
|
3
|
+
$primary-menu-height: 40px
|
4
|
+
$primary-menu-padding-v: 5px
|
5
|
+
$primary-menu-padding-h: 10px
|
6
|
+
|
7
|
+
%primary_menu
|
8
|
+
+breakpoint($desktop)
|
9
|
+
position: relative
|
10
|
+
width: 100%
|
11
|
+
min-height: $primary-menu-height
|
12
|
+
|
13
|
+
.primary-menu-inner
|
14
|
+
+horizontal-list
|
15
|
+
ul.links
|
16
|
+
padding: 0
|
17
|
+
margin: 0 -(#{$primary-menu-height}/2)
|
18
|
+
overflow: hidden
|
19
|
+
height: $primary-menu-height
|
20
|
+
|
21
|
+
// Main menubar:
|
22
|
+
.primary-links
|
23
|
+
li
|
24
|
+
margin: 0
|
25
|
+
padding: 0
|
26
|
+
text-align: center
|
27
|
+
display: inline-block
|
28
|
+
li a
|
29
|
+
display: block
|
30
|
+
padding: $primary-menu-padding-v $primary-menu-padding-h
|
31
|
+
text-decoration: none
|
32
|
+
|
33
|
+
li.first
|
34
|
+
margin-left: 0
|
35
|
+
a
|
36
|
+
padding-left: $primary-menu-padding-h
|
37
|
+
li.last
|
38
|
+
margin-right: 0
|
39
|
+
a
|
40
|
+
padding-right: $primary-menu-padding-h
|
41
|
+
|
42
|
+
|
43
|
+
// Dropdown menu:
|
44
|
+
li > .menu-minipanel-panel
|
45
|
+
top: $primary-menu-height
|
46
|
+
|
47
|
+
+breakpoint($mobile-device)
|
48
|
+
background: white
|
49
|
+
.primary-links
|
50
|
+
border: 1px solid #ddd
|
51
|
+
ul.links
|
52
|
+
margin: 0 0 0 (#{$primary-menu-height} * 1.5)
|
53
|
+
padding: 0
|
54
|
+
width: auto
|
55
|
+
list-style: none
|
56
|
+
.last
|
57
|
+
a
|
58
|
+
border-bottom: 0px solid $text-quaternary
|
59
|
+
a
|
60
|
+
width: 100%
|
61
|
+
padding: $primary-menu-padding-v
|
62
|
+
display: inline-block
|
63
|
+
border-bottom: 1px solid $text-quaternary
|
64
|
+
|
65
|
+
|
66
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
%search
|
3
|
+
+breakpoint($print-media)
|
4
|
+
display: none
|
5
|
+
|
6
|
+
&:before
|
7
|
+
content: " "
|
8
|
+
width: $header-icon
|
9
|
+
height: $header-icon
|
10
|
+
display: block
|
11
|
+
float: left
|
12
|
+
background: no-repeat 50%
|
13
|
+
+svg-bg-simple("search")
|
14
|
+
+border-radius(2px)
|
15
|
+
|
16
|
+
+breakpoint($mobile-device)
|
17
|
+
border: 1px solid #999
|
18
|
+
content: "D"
|
19
|
+
+icon-font
|
20
|
+
font-size: 32px
|
21
|
+
text-align: center
|
22
|
+
line-height: 1.35em
|
23
|
+
|
24
|
+
+breakpoint($desktop)
|
25
|
+
&:before
|
26
|
+
width: $header-icon-lg
|
27
|
+
height: $header-icon-lg
|
28
|
+
.search-block-form
|
29
|
+
height: $header-icon-lg
|
30
|
+
|
31
|
+
|
32
|
+
.search-inner
|
33
|
+
display: none
|
34
|
+
padding: 0 50px
|
35
|
+
|
36
|
+
.search-block-form
|
37
|
+
background: white
|
38
|
+
height: $header-icon
|
39
|
+
max-width: 100%
|
40
|
+
input[type="text"]
|
41
|
+
height: 35px
|
42
|
+
margin: 5px 1px
|
43
|
+
input[type="submit"]
|
44
|
+
margin: 0
|
45
|
+
padding: 0 3px
|
46
|
+
height: 39px
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.social
|
2
|
+
ul
|
3
|
+
margin: 0 0 0 5px
|
4
|
+
padding: 0
|
5
|
+
li
|
6
|
+
+inline-block
|
7
|
+
+breakpoint($mobile-device)
|
8
|
+
margin: 0 0 8px
|
9
|
+
li ~li
|
10
|
+
+breakpoint($desktop)
|
11
|
+
margin: 0 0 0 5px
|
12
|
+
a
|
13
|
+
+hide-text
|
14
|
+
+inline-block
|
15
|
+
+border-radius(20px)
|
16
|
+
font-size: 0
|
17
|
+
width: $header-icon
|
18
|
+
height: $header-icon
|
19
|
+
|
20
|
+
&.facebook
|
21
|
+
+svg-bg-simple("facebook")
|
22
|
+
&.twitter
|
23
|
+
+svg-bg-simple("twitter")
|
24
|
+
&.mail
|
25
|
+
+svg-bg-simple("email")
|
26
|
+
&.more
|
27
|
+
+svg-bg-simple("more-social")
|
28
|
+
|
29
|
+
+breakpoint($print-media)
|
30
|
+
display: none
|
File without changes
|