Issue #2398463 by amolnw2778, DickJohnson, thamas, emma.maria, LewisNyman, tadityar, lauriii, Manjit.Singh, trboslav, haasontwerp, richgilbert, pguillard, rachel_norfolk, Maninders, rteijeiro: Clean up the "content" component in Bartik

8.0.x
Alex Pott 2015-08-11 10:28:20 +01:00
parent 4b1977dc55
commit d5669ee1ff
16 changed files with 304 additions and 264 deletions

View File

@ -9,20 +9,25 @@ global-styling:
css/components/breadcrumb.css: {}
css/components/captions.css: {}
css/components/comments.css: {}
css/components/content.css: {}
css/components/contextual.css: {}
css/components/demo-block.css: {}
# @see https://www.drupal.org/node/2389735
css/components/dropbutton.component.css: {}
css/components/featured-top.css: {}
css/components/feed-icon.css: {}
css/components/field.css: {}
css/components/form.css: {}
css/components/forum.css: {}
css/components/header.css: {}
css/components/region-help.css: {}
css/components/item-list.css: {}
css/components/list-group.css: {}
css/components/list.css: {}
css/components/main-content.css: {}
css/components/messages.css: {}
css/components/node.css: {}
css/components/node-preview.css: {}
css/components/page-title.css: {}
css/components/pager.css: {}
css/components/panel.css: {}
css/components/primary-menu.css: {}
@ -38,6 +43,7 @@ global-styling:
css/components/toolbar.css: {}
css/components/featured-bottom.css: {}
css/components/password-suggestions.css: {}
css/components/ui.widget.css: {}
# @see https://www.drupal.org/node/2389735
css/components/vertical-tabs.component.css: {}
css/components/views.css: {}

View File

@ -103,10 +103,10 @@
}
.color-preview-sidebar h2 {
border-bottom: 1px solid #d6d6d6;
font-size: 1.071em;
font-weight: normal;
line-height: 1.2;
margin: 0 0 0.5em;
margin-top: 0;
margin-right: 0;
margin-left: 0;
padding-bottom: 5px;
text-shadow: 0 1px 0 #fff;
}
@ -168,8 +168,6 @@
.color-preview-footer-columns h2 {
border-bottom: 1px solid #555;
border-color: rgba(255, 255, 255, 0.15);
font-size: 1em;
margin-bottom: 0;
padding-bottom: 3px;
text-transform: uppercase;
}

View File

@ -3,6 +3,12 @@
* Visual styles for Bartik's blocks.
*/
/* Block has it's own content wrapper. */
.block .content {
margin-top: 10px;
}
/* List in block. */
.block ol,
.block ul {
margin: 0;

View File

@ -131,8 +131,23 @@
margin-right: 0;
padding: 5px 5px 5px 2px;
}
.comment--unpublished .comment__content:after,
.node--unpublished .comment__content:after {
/**
* @todo: unpublished nodes have class .node--unpublished.
* change this to .comment--unpublished.
*/
.unpublished .comment-text .comment-arrow {
border-left: 1px solid #fff4f4;
border-right: 1px solid #fff4f4;
}
.unpublished {
padding: 20px 15px 0;
}
.comment-footer {
display: table-row;
}
.comment--unpublished .comment__text:after,
.node--unpublished .comment__text:after {
border-right-color: #fff4f4; /* LTR */
}
[dir="rtl"] .comment--unpublished .comment__content:after,

View File

@ -1,241 +0,0 @@
/* ----------------- Content ------------------ */
.content,
.node__content {
margin-top: 10px;
}
h1#page-title {
font-size: 2em;
line-height: 1;
}
.main-content .section {
padding: 0 15px;
}
@media all and (min-width: 851px) {
.main-content {
float: left; /* LTR */
position: relative;
}
[dir="rtl"] .main-content {
float: right;
}
.layout-two-sidebars .main-content {
margin-left: 25%;
margin-right: 25%;
width: 50%;
}
.layout-one-sidebar .main-content {
width: 75%;
}
.layout-no-sidebars .main-content {
width: 100%;
}
.layout-sidebar-first .main-content {
margin-left: 25%; /* LTR */
margin-right: 0; /* LTR */
}
[dir="rtl"] .layout-sidebar-first .main-content {
margin-left: 0;
margin-right: 25%;
}
.layout-sidebar-second .main-content {
margin-right: 25%; /* LTR */
margin-left: 0; /* LTR */
}
[dir="rtl"] .layout-sidebar-second .main-content {
margin-right: 0;
margin-left: 25%;
}
}
#content h2 {
margin-bottom: 2px;
font-size: 1.429em;
line-height: 1.4;
}
.node__content {
font-size: 1.071em;
}
.node--view-mode-teaser .node__content {
font-size: 1em;
}
.node--view-mode-teaser h2 {
margin-top: 0;
padding-top: 0.5em;
}
.node--view-mode-teaser h2 a {
color: #181818;
}
.node--view-mode-teaser {
border-bottom: 1px solid #d3d7d9;
margin-bottom: 30px;
padding-bottom: 15px;
}
.node--view-mode-teaser.node--sticky {
background: #f9f9f9;
background: rgba(0, 0, 0, 0.024);
border: 1px solid #d3d7d9;
padding: 0 15px 15px;
}
.node--view-mode-teaser .node__content {
clear: none;
line-height: 1.6;
}
.node__meta {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.857em;
color: #68696b;
margin-bottom: -5px;
}
.node__meta .field-name-field-user-picture img {
float: left; /* LTR */
margin: 1px 20px 0 0; /* LTR */
}
[dir="rtl"] .node__meta .field-name-field-user-picture img {
float: right;
margin-left: 20px;
margin-right: 0;
}
.field-name-field-tags {
margin: 0 0 1.2em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.field-name-field-tags .field-label {
font-weight: normal;
margin: 0;
padding-right: 5px; /* LTR */
}
[dir="rtl"] .field-name-field-tags .field-label {
padding-left: 5px;
padding-right: 0;
}
.field-name-field-tags .field-label,
.field-name-field-tags ul.links {
font-size: 0.8em;
}
.node--view-mode-teaser .field-name-field-tags .field-label,
.node--view-mode-teaser .field-name-field-tags ul.links {
font-size: 0.821em;
}
.field-name-field-tags ul.links {
padding: 0;
margin: 0;
list-style: none;
}
.field-name-field-tags ul.links li {
float: left; /* LTR */
padding: 0 1em 0 0; /* LTR */
white-space: nowrap;
}
[dir="rtl"] .field-name-field-tags ul.links li {
padding: 0 0 0 1em;
float: right;
}
.node__links {
text-align: right; /* LTR */
}
[dir="rtl"] .node__links {
text-align: left;
}
@media all and (min-width: 560px) {
.node .field-type-image {
float: left; /* LTR */
margin: 0 1em 0 0; /* LTR */
}
[dir="rtl"] .node .field-type-image {
float: right;
margin: 0 0 0 1em;
}
.node .field-type-image + .field-type-image {
clear: both;
}
}
.field-type-image img,
.field-name-field-user-picture img {
margin: 0 0 1em;
}
.field-type-image a {
border-bottom: none;
}
ul.links {
color: #68696b;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.821em;
}
.node--unpublished,
.unpublished {
padding: 20px 15px 0;
}
.node-preview-container {
background: #d1e8f5;
background-image: -webkit-linear-gradient(top, #d1e8f5, #d3e8f4);
background-image: linear-gradient(to bottom, #d1e8f5, #d3e8f4);
font-family: Arial, sans-serif;
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.3333);
position: fixed;
z-index: 499;
width: 100%;
padding: 10px;
}
.node-preview-backlink {
background-color: #419ff1;
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, -webkit-linear-gradient(top, #419ff1, #1076d5);
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, linear-gradient(to bottom, #419ff1, #1076d5); /* LTR */
border: 1px solid #0048c8;
border-radius: .4em;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
color: #fff;
font-size: 0.9em;
line-height: normal;
margin: 0;
padding: 4px 1em 4px 0.6em; /* LTR */
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}
[dir="rtl"] .node-preview-backlink {
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, -webkit-linear-gradient(top, #419ff1, #1076d5);
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, linear-gradient(to bottom, #419ff1, #1076d5);
padding: 4px 0.6em 4px 1em;
float: right;
}
.node-preview-backlink:focus,
.node-preview-backlink:hover {
background-color: #419cf1;
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, -webkit-linear-gradient(top, #59abf3, #2a90ef);
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, linear-gradient(to bottom, #59abf3, #2a90ef); /* LTR */
border: 1px solid #0048c8;
text-decoration: none;
color: #fff;
}
[dir="rtl"] .node-preview-backlink:focus,
[dir="rtl"] .node-preview-backlink:hover {
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, -webkit-linear-gradient(top, #59abf3, #2a90ef);
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, linear-gradient(to bottom, #59abf3, #2a90ef);
}
.node-preview-backlink:active {
background-color: #0e69be;
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, -webkit-linear-gradient(top, #0e69be, #2a93ef);
background: url(../../../../misc/icons/000000/chevron-left.svg) left no-repeat, linear-gradient(to bottom, #0e69be, #2a93ef); /* LTR */
border: 1px solid #0048c8;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
.node-preview-backlink:active {
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, -webkit-linear-gradient(top, #0e69be, #2a93ef);
background: url(../../../../misc/icons/000000/chevron-right.svg) right no-repeat, linear-gradient(to bottom, #0e69be, #2a93ef);
}
.node-preview-backlink::before {
content: '';
width: 10px;
display: inline-block;
}
.region-content ul,
.region-content ol {
margin: 1em 0;
padding: 0 0 0.25em 15px; /* LTR */
}
[dir="rtl"] .region-content ul,
[dir="rtl"] .region-content ol {
padding: 0 15px 0.25em 0;
}
#page .ui-widget {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

View File

@ -0,0 +1,95 @@
/**
* @file
* Visual styles for Bartik's field components.
*/
.field-type-taxonomy-term-reference {
margin: 0 0 1.2em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.field-type-taxonomy-term-reference .field-label {
font-weight: normal;
margin: 0;
padding-right: 5px; /* LTR */
}
[dir="rtl"] .field-type-taxonomy-term-reference .field-label {
padding-left: 5px;
padding-right: 0;
}
.field-type-taxonomy-term-reference .field-label,
.field-type-taxonomy-term-reference ul.links {
font-size: 0.8em;
}
.node--view-mode-teaser .field-type-taxonomy-term-reference .field-label,
.node--view-mode-teaser .field-type-taxonomy-term-reference ul.links {
font-size: 0.821em;
}
.field-type-taxonomy-term-reference ul.links {
padding: 0;
margin: 0;
list-style: none;
}
.field-type-taxonomy-term-reference ul.links li {
float: left; /* LTR */
padding: 0 1em 0 0; /* LTR */
white-space: nowrap;
}
[dir="rtl"] .field-type-taxonomy-term-reference ul.links li {
padding: 0 0 0 1em;
float: right;
}
@media all and (min-width: 560px) {
.node .field-type-image {
float: left; /* LTR */
margin: 0 1em 0 0; /* LTR */
}
[dir="rtl"] .node .field-type-image {
float: right;
margin: 0 0 0 1em;
}
.node .field-type-image + .field-type-image {
clear: both;
}
}
.field-type-image img,
.field-name-field-user-picture img {
margin: 0 0 1em;
}
.field-type-image a {
border-bottom: none;
}
.field-name-field-tags {
margin: 0 0 1.2em;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.field-name-field-tags .field-label {
font-weight: normal;
margin: 0;
padding-right: 5px; /* LTR */
}
[dir="rtl"] .field-name-field-tags .field-label {
padding-left: 5px;
padding-right: 0;
}
.field-name-field-tags .field-label,
.field-name-field-tags ul.links {
font-size: 0.8em;
}
.node--view-mode-teaser .field-name-field-tags .field-label,
.node--view-mode-teaser .field-name-field-tags ul.links {
font-size: 0.821em;
}
.field-name-field-tags ul.links {
padding: 0;
margin: 0;
list-style: none;
}
.field-name-field-tags ul.links li {
float: left; /* LTR */
padding: 0 1em 0 0; /* LTR */
white-space: nowrap;
}
[dir="rtl"] .field-name-field-tags ul.links li {
padding: 0 0 0 1em;
float: right;
}

View File

@ -1,11 +1,14 @@
/* -------------- Password Field ------------- */
/**
* @file
* Visual styles for Bartik's forms.
*/
/* Password field. */
.password-field {
margin: 0;
}
/* -------------- Form Elements ------------- */
/* Form elements. */
form {
margin: 0;
padding: 0;
@ -137,6 +140,7 @@ input.form-submit:focus {
.form-actions {
padding-top: 10px;
}
/* Node Form */
#edit-body {
margin-bottom: 2em;
@ -237,9 +241,6 @@ input.form-submit:focus {
line-height: 1.2;
margin-left: 120px; /* LTR */
}
#content h2.comment-form {
margin-bottom: 0.5em;
}
.comment-form .form-textarea {
border-top-left-radius: 4px;
border-top-right-radius: 4px;

View File

@ -0,0 +1,10 @@
/**
* @file
* Visual styles for Bartik's lists.
*/
ul.links {
color: #68696b;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.821em;
}

View File

@ -0,0 +1,65 @@
/**
* @file
* Visual styles for Bartik's main-content component.
*/
.main-content .section {
padding: 0 15px;
}
.main-content h2 {
margin-bottom: 2px;
font-size: 1.429em;
line-height: 1.4;
}
@media all and (min-width: 851px) {
.main-content {
float: left; /* LTR */
position: relative;
}
[dir="rtl"] .main-content {
float: right;
}
.layout-two-sidebars .main-content {
margin-left: 25%;
margin-right: 25%;
width: 50%;
}
.layout-one-sidebar .main-content {
width: 75%;
}
.layout-no-sidebars .main-content {
width: 100%;
}
.layout-sidebar-first .main-content {
margin-left: 25%; /* LTR */
margin-right: 0; /* LTR */
}
[dir="rtl"] .layout-sidebar-first .main-content {
margin-left: 0;
margin-right: 25%;
}
.layout-sidebar-second .main-content {
margin-right: 25%; /* LTR */
margin-left: 0; /* LTR */
}
[dir="rtl"] .layout-sidebar-second .main-content {
margin-right: 0;
margin-left: 25%;
}
}
/**
* @todo Decide if we want to keep this.
* It should be in layout.css but it would be
* overridden there by block.css.
*/
.region-content ul,
.region-content ol {
margin: 1em 0;
padding: 0 0 0.25em 15px; /* LTR */
}
[dir="rtl"] .region-content ul,
[dir="rtl"] .region-content ol {
padding: 0 15px 0.25em 0;
}

View File

@ -0,0 +1,68 @@
/**
* @file
* Visual styles for Bartik's node component.
*/
.node__content {
font-size: 1.071em;
margin-top: 10px;
}
/* View mode teaser styles. */
.node--view-mode-teaser {
border-bottom: 1px solid #d3d7d9;
margin-bottom: 30px;
padding-bottom: 15px;
}
.node--view-mode-teaser h2 {
margin-top: 0;
padding-top: 0.5em;
}
.node--view-mode-teaser h2 a {
color: #181818;
}
.node--view-mode-teaser.node--sticky {
background: #f9f9f9;
background: rgba(0, 0, 0, 0.024);
border: 1px solid #d3d7d9;
padding: 0 15px 15px;
}
.node--view-mode-teaser .node__content {
clear: none;
font-size: 1em;
line-height: 1.6;
}
/* Node metadata styles. */
.node__meta {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.857em;
color: #68696b;
margin-bottom: -5px;
}
.node__meta .field-name-field-user-picture img {
float: left; /* LTR */
margin: 1px 20px 0 0; /* LTR */
}
[dir="rtl"] .node__meta .field-name-field-user-picture img {
float: right;
margin-left: 20px;
margin-right: 0;
}
/* Node links styles. */
.node__links {
text-align: right; /* LTR */
}
[dir="rtl"] .node__links {
text-align: left;
}
/* Unpublished node styles. */
.node--unpublished {
padding: 20px 15px 0;
}
.node--unpublished .comment-text .comment-arrow {
border-left: 1px solid #fff4f4;
border-right: 1px solid #fff4f4;
}

View File

@ -0,0 +1,9 @@
/**
* @file
* Visual styles for Bartik's page-title component.
*/
.page-title {
font-size: 2em;
line-height: 1em;
}

View File

@ -1,13 +1,13 @@
/* -------------- Shortcut Links -------------- */
.shortcut-wrapper {
margin: 2.2em 0 1.1em 0; /* Same as usual h1#page-title margin. */
margin: 2.2em 0 1.1em 0; /* Same as usual .page-title margin. */
}
.shortcut-wrapper h1#page-title {
.shortcut-wrapper .page-title {
float: left; /* LTR */
margin: 0;
}
[dir="rtl"] .shortcut-wrapper h1#page-title {
[dir="rtl"] .shortcut-wrapper .page-title {
float: right;
}
.shortcut-action {

View File

@ -0,0 +1,8 @@
/**
* @file
* Visual styles for Bartik's ui-widget component.
*/
#page .ui-widget {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

View File

@ -24,10 +24,10 @@ body.maintenance-page {
.maintenance-page #main {
margin: 0;
}
.maintenance-page #content .section {
.maintenance-page .content .section {
padding: 0 0 0 10px; /* LTR */
}
[dir="rtl"] .maintenance-page #content .section {
[dir="rtl"] .maintenance-page .content .section {
padding-left: 0;
padding-right: 10px;
}
@ -50,7 +50,7 @@ body.maintenance-page {
.maintenance-page #name-and-slogan a:focus {
color: #777;
}
.maintenance-page h1#page-title {
.maintenance-page .page-title {
line-height: 1em;
margin-top: 0;
}

View File

@ -23,8 +23,8 @@ body {
.shortcut-action {
display: none;
}
.one-sidebar #content,
.two-sidebars #content {
.one-sidebar .main-content,
.two-sidebars .main-content {
width: 100%;
}
.featured-bottom {

View File

@ -131,7 +131,7 @@
<a id="main-content" tabindex="-1"></a>
{{ title_prefix }}
{% if title %}
<h1 class="title" id="page-title">
<h1 class="title page-title">
{{ title }}
</h1>
{% endif %}