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

CSS tidyup, Table glitch fix, sticky "Newer version" banner #169

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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 changes: 1 addition & 1 deletion gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = (src, dest, preview) => () => {
},
]),
// NOTE importFrom is for use in supplemental CSS files
postcssVar({ importFrom: path.join(src, 'css', 'vars.css'), preserve: preview }),
postcssVar({ importFrom: path.join(src, 'css', 'vars.css'), preserve: true }),
preview ? postcssCalc : () => {},
autoprefixer,
preview ? () => {} : cssnano({ preset: 'default' }),
Expand Down
5 changes: 0 additions & 5 deletions src/css/asciidoctor-external-callout.css

This file was deleted.

232 changes: 7 additions & 225 deletions src/css/base.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/** base.css
*
* Resets and other basic CSS
*/

*,
*::before,
*::after {
Expand Down Expand Up @@ -91,7 +96,6 @@ i {
.container,
.container-fluid {
margin: 0 auto;
/* max-width: var(--width-container); */
padding: 0 var(--width-container-gutter);
}

Expand Down Expand Up @@ -119,16 +123,8 @@ i {
padding-left: 0;
}
}
/* .container-fluid {
max-width: var(--width-container-fluid);
padding: 0;
margin: 0 auto;
} */

/* checkbox css */

/* Base for label styling */

/* Checkbox css */
[type="checkbox"]:not(:checked),
[type="checkbox"]:checked {
position: absolute;
Expand Down Expand Up @@ -203,6 +199,7 @@ i {
color: #aaa;
}

/* Labels */
label:hover::before {
border: 2px solid var(--color-brand-blue);
outline: none;
Expand All @@ -216,218 +213,3 @@ label::after {
outline: none;
outline-width: 0;
}

/* Common margin padding css class */
/* margin-top */
.mt-0 {
margin-top: 0 !important;
}

.mt-1 {
margin-top: var(--base-extra-small-space) !important; /* 8px */
}

.mt-2 {
margin-top: var(--base-small-space) !important; /* 12px */
}

.mt-3 {
margin-top: var(--base-space) !important; /* 16px */
}

.mt-4 {
margin-top: var(--base-medium-space) !important; /* 24px */
}

.mt-5 {
margin-top: var(--base-large-space) !important; /* 32px */
}

/* margin-bottom */
.mb-0 {
margin-bottom: 0 !important;
}

.mb-1 {
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
}

.mb-2 {
margin-bottom: var(--base-small-space) !important; /* 12px */
}

.mb-3 {
margin-bottom: var(--base-space) !important; /* 16px */
}

.mb-4 {
margin-bottom: var(--base-medium-space) !important; /* 24px */
}

.mb-5 {
margin-bottom: var(--base-large-space) !important; /* 32px */
}

/* Responsive css */
/* For tablet,ipad Portrait view mode 1024px screen */
@media screen and (min-width: 740px) {
/* Spacing media query */
.mt-sm-0 {
margin-top: 0 !important;
}

.mt-sm-1 {
margin-top: var(--base-extra-small-space) !important; /* 8px */
}

.mt-sm-2 {
margin-top: var(--base-small-space) !important; /* 12px */
}

.mt-sm-3 {
margin-top: var(--base-space) !important; /* 16px */
}

.mt-sm-4 {
margin-top: var(--base-medium-space) !important; /* 24px */
}

.mt-sm-5 {
margin-top: var(--base-large-space) !important; /* 32px */
}

/* margin-bottom */
.mb-sm-0 {
margin-bottom: 0 !important;
}

.mb-sm-1 {
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
}

.mb-sm-2 {
margin-bottom: var(--base-small-space) !important; /* 12px */
}

.mb-sm-3 {
margin-bottom: var(--base-space) !important; /* 16px */
}

.mb-sm-4 {
margin-bottom: var(--base-medium-space) !important; /* 24px */
}

.mb-sm-5 {
margin-bottom: var(--base-large-space) !important; /* 32px */
}
}
/* For tablet,ipad landscape mode 1024px screen */
@media screen and (min-width: 993px) {
.container-fluid {
/* max-width: var(--width-container-fluid); */
padding: 0;
margin: 0 auto;
}

/* Spacing media query */
.mt-md-0 {
margin-top: 0 !important;
}

.mt-md-1 {
margin-top: var(--base-extra-small-space) !important; /* 8px */
}

.mt-md-2 {
margin-top: var(--base-small-space) !important; /* 12px */
}

.mt-md-3 {
margin-top: var(--base-space) !important; /* 16px */
}

.mt-md-4 {
margin-top: var(--base-medium-space) !important; /* 24px */
}

.mt-md-5 {
margin-top: var(--base-large-space) !important; /* 32px */
}

/* margin-bottom */
.mb-md-0 {
margin-bottom: 0 !important;
}

.mb-md-1 {
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
}

.mb-md-2 {
margin-bottom: var(--base-small-space) !important; /* 12px */
}

.mb-md-3 {
margin-bottom: var(--base-space) !important; /* 16px */
}

.mb-md-4 {
margin-bottom: var(--base-medium-space) !important; /* 24px */
}

.mb-md-5 {
margin-bottom: var(--base-large-space) !important; /* 32px */
}
}
/* For large desktop to small desktop screen */
@media screen and (min-width: 1200px) {
/* Spacing media query */
.mt-lg-0 {
margin-top: 0 !important;
}

.mt-lg-1 {
margin-top: var(--base-extra-small-space) !important; /* 8px */
}

.mt-lg-2 {
margin-top: var(--base-small-space) !important; /* 12px */
}

.mt-lg-3 {
margin-top: var(--base-space) !important; /* 16px */
}

.mt-lg-4 {
margin-top: var(--base-medium-space) !important; /* 24px */
}

.mt-lg-5 {
margin-top: var(--base-large-space) !important; /* 32px */
}

/* margin-bottom */
.mb-lg-0 {
margin-bottom: 0 !important;
}

.mb-lg-1 {
margin-bottom: var(--base-extra-small-space) !important; /* 8px */
}

.mb-lg-2 {
margin-bottom: var(--base-small-space) !important; /* 12px */
}

.mb-lg-3 {
margin-bottom: var(--base-space) !important; /* 16px */
}

.mb-lg-4 {
margin-bottom: var(--base-medium-space) !important; /* 24px */
}

.mb-lg-5 {
margin-bottom: var(--base-large-space) !important; /* 32px */
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious why we deleted all of this spacing CSS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any evidence of it being used.
It looks like tailwindCSS convention, which isn't used elsewhere in the project, so I think it's an experiment that wasn't furthered.

11 changes: 9 additions & 2 deletions src/css/body.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/* NOTE min-width of flex: 1 container = content-width to prevent wrapping by default; min-width: 0 lets content wrap */
/** body.css
*
* Styles for body, main, and .nav
* TODO: compare main.css and nav.css
*/

div.body {
display: flex;
margin-top: var(--height-to-body);
/* overflow-wrap: break-word; */
word-wrap: break-word;
/* IE only supports word-wrap, which is an alias of overflow-wrap */
}
Expand All @@ -13,6 +17,9 @@ div.body {
margin-top: var(--height-navbar);
}

/* NOTE
min-width of flex: 1 container = content-width to prevent wrapping by default;
min-width: 0 lets content wrap */
main {
flex: 1;
min-width: 0;
Expand Down
23 changes: 23 additions & 0 deletions src/css/callouts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** callouts.css
*
* Format code callouts https://docs.asciidoctor.org/asciidoc/latest/verbatim/callouts/
*
* Support for Ray's Externally defined callouts:
* https://www.npmjs.com/package/asciidoctor-external-callout
*
* Utility class `.no-callouts` lets you hide callouts in listing blocks.
* Example:
* [source.no-callouts,sqlpp]
* --
* SELECT foo from... <1>
* --
*/

div.external-callout-block i.conum {
margin-left: 10px;
margin-right: 10px;
}

.no-callouts .conum {
display: none !important;
}
6 changes: 6 additions & 0 deletions src/css/clipboard.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/** clipboard.css
*
* Styles for View Source code button
* and other listing block formatting
*/

.view-source-button,
.copy-code-button {
color: var(--color-brand-gray4);
Expand Down
18 changes: 6 additions & 12 deletions src/css/component-frame.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/** component-frame.css
*
* .component-frame and .frame-body
* NB: may be unused, deleted in 4d2db54746392090df7084978770f58f4709e56c ?
*/

.component-frame {
/* rgba(87, 160, 255, 1) */
background: var(--color-brand-gray6);
padding: 0 15px 0 15px;
display: flex;
/* align-items: center; */
justify-content: center;
position: relative;
}
Expand All @@ -20,7 +24,6 @@

.frame-body {
margin-left: var(--base-extra-small-space);
/* position: relative; */
padding-top: 12px;
padding-bottom: 12px;
padding-right: 0;
Expand Down Expand Up @@ -48,9 +51,6 @@
.component-frame .frame-link-dropdowns {
display: inline-block;
line-height: 1;
/* position: relative;
padding-bottom: 20px;
margin-bottom: -20px; */
}

.frame-body .frame-link {
Expand Down Expand Up @@ -99,7 +99,6 @@
.frame-dropdown ul {
background: var(--color-brand-white);
border-radius: 0;
/* box-shadow: 0 3px 10px -4px var(--color-brand-gray8); */
margin: 0;
}

Expand Down Expand Up @@ -127,11 +126,6 @@
border-left: 3px solid var(--color-brand-gray8);
}

/* .frame-dropdown ul.frame-dropdown-list li,
.frame-dropdown ul.related li {
border-bottom: 1px solid var(--color-brand-gray8);
} */

ul.frame-dropdown-list li:last-child,
.frame-dropdown ul.related li:last-child {
border-bottom: 0;
Expand Down
Loading