Template:Quote fancy/style.css: Difference between revisions
Jump to navigation
Jump to search
(Completed move) |
(New parameter: image-align (center or edge)) |
||
Line 10: | Line 10: | ||
/* Main div for for the template */ | /* Main div for for the template */ | ||
.bg3wiki-fancy-quote { | .bg3wiki-fancy-quote { | ||
display: | display: grid; | ||
width: 100%; | |||
} | } | ||
Line 17: | Line 18: | ||
padding: 8px 16px; | padding: 8px 16px; | ||
margin: auto; | margin: auto; | ||
} | } | ||
Line 26: | Line 25: | ||
margin-top: 10px; | margin-top: 10px; | ||
border-left: 0 !important; | border-left: 0 !important; | ||
grid-row: 2; | |||
grid-column: 2; | |||
} | } | ||
.bg3wiki-fancy-quote-image { | .bg3wiki-fancy-quote-image-right, .bg3wiki-fancy-quote-image-left { | ||
margin: auto; | margin: auto; | ||
grid-row: 1 | grid-row: 1; | ||
grid-column: 2 | grid-column: 2; | ||
} | } | ||
.bg3wiki-fancy-quote-author { | |||
grid-row: 3; | |||
grid-column: 2; | |||
} | |||
.bg3wiki-fancy-quote { | .bg3wiki-fancy-quote { | ||
justify-content: center !important; | justify-content: center !important; | ||
Line 44: | Line 49: | ||
.bg3wiki-fancy-quote-blockquote-left { | .bg3wiki-fancy-quote-blockquote-left { | ||
margin-left: 10px; | margin-left: 10px; | ||
border-left: 2px solid #3d3d3d !important | border-left: 2px solid #3d3d3d !important; | ||
grid-row: 1; | |||
grid-column: 2; | |||
} | } | ||
.bg3wiki-fancy-quote-blockquote-right { | .bg3wiki-fancy-quote-blockquote-right { | ||
margin-right: 10px; | margin-right: 10px; | ||
border-left: 0 !important; | border-left: 0 !important; | ||
border-right: 2px solid #3d3d3d | border-right: 2px solid #3d3d3d; | ||
grid-row: 1; | |||
grid-column: 2; | |||
} | } | ||
.bg3wiki-fancy-quote-image-right { | |||
.bg3wiki-fancy-quote-image { | margin: auto 0; | ||
grid-row: 1; | |||
grid-row: 2; | grid-column: 3; | ||
} | |||
.bg3wiki-fancy-quote-image-left { | |||
margin: auto 0; | |||
grid-row: 1; | |||
grid-column: 1; | |||
} | |||
.bg3wiki-fancy-quote-author { | |||
grid-row: 2; | |||
grid-column: 2; | |||
} | |||
} | } | ||
Line 65: | Line 84: | ||
font-size: smaller; | font-size: smaller; | ||
font-weight: bold; | font-weight: bold; | ||
} | } | ||
Revision as of 06:46, 23 July 2024
/*
* The content of the template is layed out in a 3x3 grid with the main quote
* always at the center (2,2) and the author attribution just below at (2,3).
* The image may be placed to the left at (1,2), to the right at (3,2), or above
* at (2,1) depending on the specified layout.
*
* Mobile always uses the vertical layout.
*/
/* Main div for for the template */
.bg3wiki-fancy-quote {
display: grid;
width: 100%;
}
/* Blockquote style changes depending if the image is on the left or right and on mobile */
.bg3wiki-fancy-quote-blockquote-left, .bg3wiki-fancy-quote-blockquote-right {
padding: 8px 16px;
margin: auto;
}
/* Mobile-specific style. Override the layout to be vertical and centered */
@media screen and (max-width: 779px) {
.bg3wiki-fancy-quote-blockquote-left, .bg3wiki-fancy-quote-blockquote-right {
margin-top: 10px;
border-left: 0 !important;
grid-row: 2;
grid-column: 2;
}
.bg3wiki-fancy-quote-image-right, .bg3wiki-fancy-quote-image-left {
margin: auto;
grid-row: 1;
grid-column: 2;
}
.bg3wiki-fancy-quote-author {
grid-row: 3;
grid-column: 2;
}
.bg3wiki-fancy-quote {
justify-content: center !important;
}
}
/* Non-mobile style */
@media screen and (min-width: 780px) {
.bg3wiki-fancy-quote-blockquote-left {
margin-left: 10px;
border-left: 2px solid #3d3d3d !important;
grid-row: 1;
grid-column: 2;
}
.bg3wiki-fancy-quote-blockquote-right {
margin-right: 10px;
border-left: 0 !important;
border-right: 2px solid #3d3d3d;
grid-row: 1;
grid-column: 2;
}
.bg3wiki-fancy-quote-image-right {
margin: auto 0;
grid-row: 1;
grid-column: 3;
}
.bg3wiki-fancy-quote-image-left {
margin: auto 0;
grid-row: 1;
grid-column: 1;
}
.bg3wiki-fancy-quote-author {
grid-row: 2;
grid-column: 2;
}
}
/* Author/attribution of the quote is aligned to the bottom-right corner of the quote */
.bg3wiki-fancy-quote-author {
margin-left: auto;
margin-right: 32px;
font-size: smaller;
font-weight: bold;
}
/* Style for the beginning and ending quotation marks aligned with the corners of the quote */
.bg3wiki-fancy-quote-begin, .bg3wiki-fancy-quote-end {
font-size: 300%;
font-family: serif;
color: #3d3d3d;
line-height: 1em;
}
.bg3wiki-fancy-quote-begin {
margin-bottom: auto;
margin-right: 8px
}
.bg3wiki-fancy-quote-end {
margin-top: auto;
margin-left: 8px
}