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

clean and consolidate styling for callout boxes #541

Merged
merged 2 commits into from
May 16, 2022
Merged
Changes from 1 commit
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
131 changes: 27 additions & 104 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ h1, h2, h3, h4 {
}


.book .book-body .page-wrapper .page-inner section.normal h1,
.book .book-body .page-wrapper .page-inner section.normal h2,
.book .book-body .page-wrapper .page-inner section.normal h3,
.book .book-body .page-wrapper .page-inner section.normal h4,
.book .book-body .page-wrapper .page-inner section.normal h5,
.book .book-body .page-wrapper .page-inner section.normal h1,
.book .book-body .page-wrapper .page-inner section.normal h2,
.book .book-body .page-wrapper .page-inner section.normal h3,
.book .book-body .page-wrapper .page-inner section.normal h4,
.book .book-body .page-wrapper .page-inner section.normal h5,
.book .book-body .page-wrapper .page-inner section.normal h6 {
margin-top: 2.275em;
margin-bottom: 1em;
Expand All @@ -80,7 +80,7 @@ h1, h2, h3, h4 {
font-family: 'Lora';
color: #0b8d96;
}


/*----------DROP CAPS--------------*/

Expand Down Expand Up @@ -146,7 +146,7 @@ color: #012d72
}

/* all TOC list items, basically */
.book .book-summary ul.summary li a,
.book .book-summary ul.summary li a,
.book .book-summary ul.summary li span {
padding-top: 8px;
padding-bottom: 8px;
Expand All @@ -157,14 +157,14 @@ color: #012d72

.summary a:hover {
color: #68ace5 !important;
}
}

.book .book-summary ul.summary li.active>a { /*active TOC links*/
color: #68ace5 !important;
border-left: solid 4px;
border-color: #68ace5;
padding-left: 11px !important;
}
}


li.appendix span, li.part span { /* for TOC part names */
Expand Down Expand Up @@ -206,7 +206,7 @@ li.appendix span, li.part span { /* for TOC part names */
}

.summary > li:first-child {
height: auto !important;
height: auto !important;
}

/* --------------Two columns--------------- */
Expand Down Expand Up @@ -250,95 +250,57 @@ li.appendix span, li.part span { /* for TOC part names */
/* Sidebar formating --------------------------------------------*/
/* from r-pkgs.org*/


div.notice{
border: 4px #68ace5;
div.notice, div.warning, div.github, div.dictionary, div.reflection {
border-style: solid;
padding: 1em;
margin: 1em 0;
padding-left: 100px;
background-size: 70px;
background-repeat: no-repeat;
background-position: 15px center;
min-height: 120px;
background-color: #e8ebee;
background-repeat: no-repeat;
}

div.notice{
border: 4px #68ace5;
background-size: 70px;
background-position: 15px center;
background-color: #e8ebee;
background-image: url("../assets/box_images/note.png");
}

div.warning{
border: 4px #e0471c;
border-style: solid;
padding: 1em;
margin: 1em 0;
padding-left: 100px;
background-size: 70px;
background-repeat: no-repeat;
background-position: 15px center;
min-height: 120px;
background-color: #e8ebee;
}

div.warning{
background-image: url("../assets/box_images/warning.png");
}



div.github{
border: 4px #000000;
border-style: solid;
padding: 1em;
margin: 1em 0;
padding-left: 100px;
background-size: 70px;
background-repeat: no-repeat;
background-position: 15px center;
min-height: 120px;
background-color: #e8ebee;
}

div.github{
background-image: url("../assets/box_images/github.png");
}

div.dictionary{
border: 4px #68ace5;
border-style: solid;
padding: 1em;
margin: 1em 0;
padding-left: 100px;
background-size: 70px;
background-repeat: no-repeat;
background-position: 15px center;
min-height: 120px;
background-color: #e8ebee;
}

div.dictionary{
background-image: url("../assets/box_images/dictionary.png");
}


div.reflection{
border: 4px #68ace5;
border-style: solid;
padding: 1em;
margin: 1em 0;
padding-left: 100px;
background-size: 90px;
background-repeat: no-repeat;
background-position: 15px center;
min-height: 120px;
background-color: #e8ebee;
}

div.reflection{
background-image: url("../assets/box_images/thinking_face.png");
}

/* old style boxes - keep for backwards compatibility?*/

div.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{
border: 4px #aed6d963;
border-style: dashed solid;
Expand All @@ -353,29 +315,6 @@ div.rstudio-tip, div.tip, div.gotcha, div.design, div.hat{
background-color: #fcfcfc;
}


div.rstudio-tip {
background-image: url("../images/divs/rstudio.png");
}

div.tip {
background-image: url("../images/divs/lightbulb.png");
}

div.gotcha {
background-image: url("../images/divs/gotcha_2.png");
}

div.design {
background-image: url("../images/divs/design.png");
}

div.hat {
background-image: url("../images/divs/hat.png");
}

/* for fancy bookdown cookbook */

div.puzzle, div.fyi, div.demo, div.note {
padding: 1em;
margin: 1em 0;
Expand All @@ -389,22 +328,6 @@ div.puzzle, div.fyi, div.demo, div.note {
border: solid 5px #dfedff;
}

div.puzzle {
background-image: url("../images/illos/Your-turn.png");
}

div.fyi {
background-image: url("../images/illos/fyi.png");
}

div.demo {
background-image: url("../images/illos/Live-code.png");
}

div.note {
background-image: url("../images/illos/lightbulb2.png");
}


/* .book .book-body .page-wrapper .page-inner section.normal is needed
to override the styles produced by gitbook, which are ridiculously
Expand All @@ -421,12 +344,12 @@ div.note {
margin-bottom: 0;
}

iframe {
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
-o-transform-origin: top left;
-ms-transform-origin: top left;
transform-origin: top left;
iframe {
-moz-transform-origin: top left;
-webkit-transform-origin: top left;
-o-transform-origin: top left;
-ms-transform-origin: top left;
transform-origin: top left;
}

.iframe-container {
Expand Down Expand Up @@ -493,14 +416,14 @@ a.anchor {
}


.hasAnchor:hover a.anchor,
.hasAnchor:hover a.anchor,
a.anchor:hover {
/*visibility: visible;*/
opacity: 0.6;
}

/* disable anchors for headers with "no-anchor" class */
.no-anchor .hasAnchor:hover a.anchor,
.no-anchor .hasAnchor:hover a.anchor,
.no-anchor a.anchor:hover {
opacity: 0 !important;
}
Expand Down Expand Up @@ -528,4 +451,4 @@ a.anchor:hover {
font-family: "Lora", serif;
font-size: .85em;
color: #193a5c;
}
}