Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Basis #18

Merged
merged 4 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,209 changes: 2,209 additions & 0 deletions basis.html

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions core/misc/opensans/opensans.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('OpenSans-Regular-webfont.eot'); /* Old IE */
src:
url('OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
url('OpenSans-Regular-webfont.woff') format('woff'),
url('OpenSans-Regular-webfont.ttf') format('truetype'),
url('OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
}

@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: url('OpenSans-Italic-webfont.eot'); /* Old IE */
src:
url('OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('OpenSans-Italic-webfont.woff') format('woff'),
url('OpenSans-Italic-webfont.ttf') format('truetype'),
url('OpenSans-Italic-webfont.svg#open_sanslight') format('svg');
}

@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: url('OpenSans-Bold-webfont.eot'); /* Old IE */
src:
url('OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('OpenSans-Bold-webfont.woff') format('woff'),
url('OpenSans-Bold-webfont.ttf') format('truetype'),
url('OpenSans-Bold-webfont.svg#open_sansbold') format('svg');
}

@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: url('OpenSans-BoldItalic-webfont.eot'); /* Old IE */
src:
url('OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('OpenSans-BoldItalic-webfont.woff') format('woff'),
url('OpenSans-BoldItalic-webfont.ttf') format('truetype'),
url('OpenSans-BoldItalic-webfont.svg#open_sansbold_italic') format('svg');
}

17 changes: 17 additions & 0 deletions core/themes/basis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Basis Theme
Default theme in Backdrop.

## Responsive Strategy
Media queries and other responsive code should be mobile first. This means all
media queries should be `min-width`. Breakpoints are set in `em` as it works
better with accessibility technologies than px units do.

The breakpoints are:
* `(min-width: 25em)` - About `400px`
* `(min-width: 34em)` - About `544px`
* `(min-width: 48em)` - About `768px`
* `(min-width: 62em)` - About `992px`
* `(min-width: 75em)` - About `1200px`

## CSS documentation
See [README.md in css directory](css/README.md).
68 changes: 68 additions & 0 deletions core/themes/basis/color/color.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

$info = array(
// Available colors and color labels used in theme.
'fields' => array(
'header' => t('Header background'),
'base' => t('Site name background'),
'slogan' => t('Slogan background'),
'titleslogan' => t('Site name and slogan'),
'bg' => t('Main background'),
'footer' => t('Footer background'),
'text' => t('Text color'),
'link' => t('Link color'),
'hovermenu' => t('Main menu hover background'),
'primarytabs' => t('Primary Tabs background'),
'borders' => t('Borders'),
'formfocusborder' => t('Form element borders when selected'),
'buttons' => t('Buttons and Breadcrumb'),
),
// Pre-defined color schemes.
'schemes' => array(
'default' => array(
'title' => t('Basis (default)'),
'colors' => array(
'header' => '#20252e',
'base' => '#0074bd',
'slogan' => '#000000',
'titleslogan' => '#fffffe',
'bg' => '#ffffff',
'footer' => '#fffeff',
'text' => '#000001',
'link' => '#0073bd',
'hovermenu' => '#114a75',
'primarytabs' => '#586172',
'borders' => '#bbbbbb',
'formfocusborder' => '#43afe4',
'buttons' => '#dee2ea',
),
),
),

'blend_target' => '#ffffff',

// CSS files (excluding @import) to rewrite with new color scheme.
'css' => array(
'css/base.css',
'css/layout.css',
'css/component/small-text-components.css',
'css/component/header.css',
'css/component/footer.css',
'css/component/menu-dropdown.css',
'css/component/menu-toggle.css',
'css/component/backdrop-form.css',
'css/component/tabledrag.css',
'css/component/vertical-tabs.css',
'css/component/fieldset.css',
'css/component/dialog.css',
'css/component/progress.css',
'css/component/admin-tabs.css',
'css/component/breadcrumb.css',
'css/component/pager.css',
'css/component/hero.css',
'css/component/teasers.css',
'css/component/comment.css',
'css/component/caption.css',
'css/skin.css',
),
);
22 changes: 22 additions & 0 deletions core/themes/basis/css/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Basis inludes very granular CSS files so that a sub theme can override
only the files it needs to and inherit the rest.

## CSS Files
The types of CSS files in the theme include:
* Base - Normalizes rendering across browsers.
* Layout - Modifies page layout.
* Component - Specific styles for individual pieces of functionality.
* Skin - The colors, fonts, and aesthetic CSS

A good way to think about overriding files:
* Start by overriding skin.css with the colors and fonts you'd prefer
* If there are other changes to be made, copy over the files one by one and
override as needed

### To override a CSS file:
Declare it in your .info file with the same file name.
The file in Basis with the same name will not be loaded. The file in the active
theme will be used in it's place.

# CSS Guidelines
[See Backdrop's CSS Standards](https://api.backdropcms.org/css-standards)
220 changes: 220 additions & 0 deletions core/themes/basis/css/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
/**
* @file
* Base element styles and normalize overrides.
*/

* {
box-sizing: border-box;
}

body {
font-size: 16px;
line-height: 1.6;
color: #000001;
}

li {
margin: 0 0 0.5em;
}

figure {
margin: 0;
}

blockquote {
border-left: 0.25rem solid #bbbbbb; /* LTR */
}
[dir="rtl"] blockquote {
border-left: none;
border-right: 0.25rem solid #bbbbbb;
}

blockquote {
margin: 0.5em 0 1em;
padding: 0.8em 1.3em;
}

blockquote > :first-child {
margin-top: 0;
}

blockquote > :last-child {
margin-bottom: 0;
}

pre,
code {
font-family: Consolas, 'Lucida Console', 'Courier New', monospace;
color: #20252e;
}

code {
display: inline-block;
padding: 0 0.375em;
border: 0.0625rem solid #bbbbbb;
background: #dee2ea;
}

pre code {
margin: 0;
padding: 0.8em 1.3em;
border: 0;
border-left: 0.25rem solid #bbbbbb;
background: transparent;
}

code p {
display: inline;
margin: 0;
padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
line-height: 1.4;
margin: 1rem 0 0.5rem;
}

h1,
h2 {
font-weight: 200;
}

h1 {
font-size: 2.25rem;
}

h2 {
font-size: 1.8125rem;
}

h3 {
font-size: 1.625rem;
font-weight: 400;
}

h4 {
font-size: 1.4375rem;
}

h5 {
font-size: 1.25rem;
}

h6 {
font-size: 1rem;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
text-decoration: none;
}

img {
max-width: 100%;
height: auto;
}

iframe {
max-width: 100%;
}

label {
font-weight: 600;
}

/**
* Table tags
*/
table {
width: 100%;
margin: 0 0 1em;
border-collapse: collapse;
border-spacing: 0;
}

caption {
font-size: 1.6rem;
font-weight: 400;
}

th,
td,
caption {
padding: 0.8em 0.8em;
}

th,
td {
padding: 0.8em 0.8em;
line-height: 1.3;
}

td {
border: 0.0625rem solid #dee2ea;
}

th {
border-right: 0.0625rem solid #bbbbbb;
background: #dee2ea;
}

th:last-child {
border-right-color: #dee2ea;
}

table [aria-sort] a:after {
content: '';
display: inline-block;
width: 0;
height: 0;
border: 0.375em solid transparent;
}

table [aria-sort="descending"] a:after {
border-top-color: #333333;
border-bottom-width: 0;
}

table [aria-sort="ascending"] a:after {
border-bottom-color: #333333;
border-top-width: 0;
}

table [aria-sort] img {
visibility: hidden;
}

/**
* Fieldset styles
*/
fieldset {
position: relative;
max-width: 100%;
margin: 1em 0;
padding: 3.774em 0 0 0; /* LTR */
border: 0.125em solid #eaeaea;
min-width: 0;
}

[dir="rtl"] fieldset {
padding: 2.5em 0 0;
}

/**
* Clearfix text areas in case of floated contents
*/
.field-type-text-long:after,
.field-type-text-with-summary:after {
content: '';
display: table;
clear: both;
}
Loading