Skip to content

Commit

Permalink
otb theme update blockquote, table caption
Browse files Browse the repository at this point in the history
  • Loading branch information
bdolor committed Mar 15, 2018
1 parent 84d7013 commit cb862ce
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 257 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@standards"
],
"standards": [
"vendor/bin/phpcs --standard=phpcs.ruleset.xml *.php ."
"vendor/bin/phpcs --standard=phpcs.ruleset.xml ."
]
}
}
2 changes: 1 addition & 1 deletion pressbooks-textbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/BCcampus/pressbooks-textbook
* Tags: pressbooks, OER, publishing, textbooks
* Pressbooks tested up to: 5.0.2
* Pressbooks tested up to: 5.1.0
*/

// If file is called directly, abort.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| Colors
|--------------------------------------------------------------------------
|
| Open Textbook Variable Overrides
| Open Textbook Variables
|
|
*/
Expand Down
309 changes: 147 additions & 162 deletions themes-book/opentextbook/assets/styles/components/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,206 +205,191 @@ $list-style-type-2: lower-roman;
$list-style-type-3: outside circle;
//$list-style-type-4: outside disc;

/****************************************
Body
*****************************************/
small {
font-size: 80%;
}
@mixin otb-elements {
/****************************************
Body
*****************************************/
small {
font-size: 80%;
}

/****************************************
/****************************************
Paragraphs
*****************************************/
@if $type != 'web' {
p + p{
*****************************************/
p + p {
text-indent: 0;
}
}

@if $type == 'web' {
.front-matter,
.part,
.chapter,
.back-matter {
p + p {
text-indent: 0;
}
}
}

/****************************************
/****************************************
Headings
*****************************************/

h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p,
h6 + p {
margin-top: -5px;
margin-bottom: 15px;
}
*****************************************/

h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p,
h6 + p {
margin-top: -5px;
margin-bottom: 15px;
}

/****************************************
Lists
*****************************************/
.front-matter,
.part,
.chapter,
.back-matter {
#content {
ul {
//list-style: $list-style-type-3;
}
.entry-content {
ul {
margin-left: 30px;
//list-style: $list-style-type-3;
ul {
list-style: $list-style-type-3;
}
}
ol {
margin-left: 30px;
/****************************************
Lists
*****************************************/

ul {
margin-left: 30px;
//list-style: $list-style-type-3;
}
}
}
ol {
list-style: none outside;
counter-reset: level1;
text-indent: -1em;

ol.alphalist li::before {
&.alphalist li::before {
content: normal;
}

ol {
list-style: none outside;
counter-reset: level1;
text-indent: -1em;
}

ol li::before {
li::before {
content: counter(level1) ". ";
counter-increment: level1;
}

ol li ul li::before {
content: '';
li {
li::before {
list-style-position: outside;
content: counter(level2, $list-style-type) ". ";
counter-increment: level2;
}
ul li::before {
content: '';

}
li li::before {
list-style-position: outside;
content: counter(level3, $list-style-type-2) ". ";
counter-increment: level3;
}
}

ol ol {
ol {
list-style: none outside;
counter-reset: level2;
}

ol li li::before {
list-style-position: outside;
content: counter(level2, $list-style-type) ". ";
counter-increment: level2;
ol {
list-style: none outside;
counter-reset: level3;
}
}

ol ol ol {
list-style: none outside;
counter-reset: level3;
}

/****************************************
Tables
*****************************************/

table {
max-width: 100%;
border-collapse: collapse;
display: table; /* display:table is better for screen readers than display:block */
overflow-x: auto;
caption {
caption-side: top;
text-align: center;
color: $color-black;
}
td, th {
vertical-align: middle;
}
th {
font-weight: bold;
background-color: $color-gray-mercury;
vertical-align: bottom;
border-bottom: 2px solid $color-gray-alto;
}
p {
text-align: left;
}
&.lines {
tr {
border-top: 1px solid $color-black;
border-bottom: 1px solid $color-black;
}
}
&.no-lines {
tr, td {
border-top: 0;
border-bottom: 0;
}
}
&.shaded, th.shaded, tr.shaded, td.shaded {
background-color: $color-gray-gallery;
}
th.border, tr.border, td.border {
border: 1px solid $color-black;

ol li li li::before {
list-style-position: outside;
content: counter(level3, $list-style-type-2) ". ";
counter-increment: level3;
}
}
}

/****************************************
Tables
*****************************************/

table {
max-width: 100%;
border-collapse: collapse;
display: table; /* display:table is better for screen readers than display:block */
overflow-x: auto;
}

table td,
table th {
vertical-align: middle;
}

#content table td,
#content table th {
border: 1px solid $color-gray-alto;
}
/****************************************
Sub/Sup
*****************************************/

#content tr th, #content thead th {
color: $color-black; /* increase contrast for accessibility */
}

table th {
font-weight: bold;
background-color: $color-gray-mercury;
vertical-align: bottom;
border-bottom: 2px solid $color-gray-alto;
}
sup,
sub {
position: relative;
height: 0;
line-height: 1;
vertical-align: baseline;
}

table p {
text-align: left;
}
sup {
bottom: 1ex;
}

table.lines tr {
border-top: 1px solid $color-black;
border-bottom: 1px solid $color-black;
}
sub {
top: 0.5ex;
}

table.no-lines tr,
table.no-lines td {
border-top: 0;
border-bottom: 0;
}
/****************************************
Blockquotes - missing for exports
*****************************************/
blockquote {
padding: 1px 5px 5px 50px;
margin-bottom: 20px;
background-color: $color-desert-storm;
background-image: url(if-map-get($blockquote-open-url, $type)) no-repeat 10px 10px;

table.shaded,
th.shaded,
tr.shaded,
td.shaded {
background-color: $color-gray-gallery;
}
}

th.border,
tr.border,
td.border {
border: 1px solid $color-black;
}

/****************************************
Sub/Sup
*****************************************/

sup,
sub {
position: relative;
height: 0;
line-height: 1;
vertical-align: baseline;
/*
|--------------------------------------------------------------------------
| Not web
|--------------------------------------------------------------------------
|
|
|
|
*/
@if $type != 'web' {
@include otb-elements;
}

sup {
bottom: 1ex;
/*
|--------------------------------------------------------------------------
| Web
|--------------------------------------------------------------------------
|
| Web styles require CSS specificity
|
|
*/
@if $type == 'web' {
.front-matter,
.part,
.chapter,
.back-matter {
@include otb-elements;
}
}

sub {
top: 0.5ex;
}

/****************************************
Blockquotes - missing for exports
*****************************************/
blockquote {
padding: 1px 5px 5px 50px;
margin-bottom: 20px;
@if $type == 'prince' or $type == 'epub' {
background: $color-desert-storm url('images/blockquote-open.png') no-repeat 10px 10px;
}
}
6 changes: 6 additions & 0 deletions themes-book/opentextbook/assets/styles/components/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ $prince-image-resolution: 135dpi !default;
|
|
*/
// blockquote image
$blockquote-open-url: (
prince: "assets/images/blockquote-open.png",
epub: "assets/images/blockquote-open.png",
web: "assets/images/blockquote-open.png"
);

.wp-caption-text{
text-align: left;
Expand Down
Loading

0 comments on commit cb862ce

Please sign in to comment.