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

Refresh table & Right SideBar UI Styling. #80

Open
wants to merge 10 commits into
base: ui-refresh
Choose a base branch
from
4 changes: 2 additions & 2 deletions src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body {

body {
color: var(--color-text);
font-family: "Gotham", sans-serif;
font-family: "Source Sans Pro", sans-serif;
line-height: 1.5;
margin: 0;
}
Expand Down Expand Up @@ -67,7 +67,7 @@ html code {

b,
strong {
font-weight: var(--weight-medium);
font-weight: var(--weight-bold);
}

small {
Expand Down
70 changes: 19 additions & 51 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
.doc h2 {
font-size: 1.875rem;
margin: 2.25rem 0 2.5rem;
max-width: fit-content; /* NOTE used to restrict width of key line */
max-width: fit-content;
/* NOTE used to restrict width of key line */
}

.doc h2::after {
Expand Down Expand Up @@ -134,12 +135,12 @@
.doc .literalblock .title,
.doc .openblock .title,
.doc caption {
/* font-size: 1.125rem; */
font-size: 1.0625rem;
font-weight: var(--weight-bold);
font-size: 1rem;
font-weight: var(--weight-semibold);
letter-spacing: -0.025em;
line-height: 1.2;
margin-bottom: 0.25rem;
color: var(--color-brand-gray3);
}

.doc hr {
Expand All @@ -148,7 +149,7 @@
border-top-width: 1px;
}

.doc table.tableblock,
/* .doc table.tableblock,
.doc th.tableblock,
.doc td.tableblock {
border: 0 solid var(--color-border-table);
Expand All @@ -158,9 +159,10 @@
border-width: 1px;
border-collapse: collapse;
margin: 1.5rem 0 2rem;
}
} */

/* TODO drop .spread after upgrading to Asciidoctor 1.5.7 */

.doc table.spread,
.doc table.stretch {
width: 100%;
Expand All @@ -170,59 +172,22 @@
text-align: left;
}

.doc table.tableblock > tbody {
/* .doc table.tableblock > tbody {
font-weight: var(--weight-light);
}
} */

/* NOTE prevent wide tables from exceeding bounds */

/* TODO could also target table.tableblock[style^="width:"] */

/* TODO drop .spread after upgrading to Asciidoctor 1.5.7 */

.doc table.spread > tbody > tr > *,
.doc table.stretch > tbody > tr > * {
/* NOTE setting max-width reactivates overflow-wrap behavior on the table cell */
max-width: 0;
}

/* NOTE alternate way to prevent wide tables from exceeding bounds, but can overly compress header cells */
/* table-layout: fixed strictly enforces table and column widths */
/* another alternative is to wrap table in div and set overflow-x: auto on wrapper */
/*
.doc table.spread,
.doc table.stretch {
table-layout: fixed;
}
*/

.doc table.tableblock > tbody > tr:nth-of-type(even) {
background-color: var(--color-shade);
}

.doc th.tableblock {
font-weight: var(--weight-medium);
letter-spacing: -0.025em;
}

.doc th.tableblock,
.doc td.tableblock {
border-width: 0 1px;
padding: 0.75rem 1rem;
}

.doc thead th.tableblock {
border-width: 1px;
font-size: 1.0625rem;
line-height: 1.2;
}

.doc p.tableblock + p.tableblock {
margin-top: 1rem;
}

/* NOTE in Asciidoctor 1.5.7, this div will have a class */
.doc td.tableblock > div > :first-child {
margin-top: 0;
}

.doc .halign-left {
text-align: left;
}
Expand Down Expand Up @@ -262,7 +227,7 @@
}

.doc .admonitionblock td.icon i::before {
background: no-repeat 0/cover;
background: no-repeat 0 / cover;
content: "";
display: block;
height: 1.875rem;
Expand Down Expand Up @@ -506,7 +471,8 @@
.doc pre.highlight code {
background-color: #151514;
color: #f8f8f2;
font-weight: var(--weight-normal); /* needed to override third-party styles */
font-weight: var(--weight-normal);
/* needed to override third-party styles */
padding: 0.625rem;
white-space: pre-wrap;
/* NOTE enable these styles if side-to-side scrolling is preferred */
Expand All @@ -518,6 +484,7 @@
}

/* NOTE assume pre.highlight contains code[data-lang] */

.doc pre.highlight {
position: relative;
}
Expand Down Expand Up @@ -751,7 +718,8 @@
background-color: var(--color-brand-white);
content: "";
display: block;
height: 3px; /* Chrome doesn't always paint the line accurately, so add a little extra */
height: 3px;
/* Chrome doesn't always paint the line accurately, so add a little extra */
position: absolute;
bottom: -1.5px;
left: 0;
Expand Down
165 changes: 165 additions & 0 deletions src/css/is-this-helpful.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@

@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700&display=swap");

.is-this-helpful-box * {
font-family: "Source Sans Pro", sans-serif;
}

.is-this-helpful-box {
display: inline-block;
width: 100%;
margin-bottom: 25px;
border-top: 1px solid #ccc;
padding-top: 25px;
font-family: "Source Sans Pro", sans-serif;
}

.is-this-helpful-box .btn-row {
display: flex;
width: 100%;
justify-content: flex-start;
margin: 15px 0;
}

.is-this-helpful-box .btn-row .helpfull-btn {
font-size: 0.875rem;
line-height: 1.125rem;
color: var(--color-brand-gray4);
}

.is-this-helpful-box .btn-row .helpfull-btn:hover,
.is-this-helpful-box .btn-row .helpfull-btn.active {
color: var(--color-brand-blue);
text-decoration: none;
}

.is-this-helpful-box .btn-row .like-btn {
margin-right: 15px;
}

.is-this-helpful-box .input-control {
width: 100%;
display: inline-block;
padding: 8px 12px;
border-radius: 5px;
border: 1px solid var(--color-brand-gray5);
resize: vertical;
font-size: 1rem;
color: var(--color-brand-gray4);
font-family: "Source Sans Pro", sans-serif;
}

.dialog-box {
display: none;
}

.dialog-box .blue-btn {
background-color: var(--color-brand-blue);
color: var(--color-brand-white);
font-size: 0.875rem;
line-height: 1.375rem;
border: 2px solid var(--color-brand-blue);
display: inline-block;
border-radius: 5px;
font-weight: 500;
height: 30px;
width: 65px;
margin: 0 10px;
}

.dialog-box .disabled {
pointer-events: none;
opacity: 0.5;
}

.dialog-box .blue-btn.like-btn {
opacity: 1;
}

.is-this-helpful-box h4 {
font-weight: var(--weight-semibold);
margin: 0 0 10px;
font-size: 0.875rem;
line-height: 1.125rem;
color: var(--color-brand-gray4);
}

.is-this-helpful-box .action-btn-row {
text-align: right;
margin-top: 10px;
padding: 0 10px;
}

.is-this-helpful-box .action-btn-row .skip-btn {
display: inline-block;
font-weight: var(--weight-semibold);
font-size: 0.875rem;
line-height: 1.125rem;
color: var(--color-brand-blue);
}

.is-this-helpful-box .action-btn-row .info-btn {
font-size: 0.75rem;
line-height: 0.75rem;
color: var(--color-brand-gray4);
display: inline-block;
}

.is-this-helpful-box .text-msg p {
font-size: 0.875rem;
line-height: 1.125rem;
color: var(--color-brand-gray3);
}

.is-this-helpful-box .leave-addtional-box {
display: none;
}

/* Page Rating css */
.modal-popup {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
width: 100%;
height: 100%;
display: none;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1001;
}



.modal-popup .modal-popup-dialogue {
padding: 10px 15px;
/* height: auto; */
width: 50%;
max-width: 400px;
background: #fff;
position: relative;
z-index: 9;
margin: auto;
box-shadow: 0 0 10px #333;
transform: translate(0%, -100%);
transition: all 0.3s;

}

.modal-popup.show{
display: block;
}

.modal-popup.show .modal-popup-dialogue{
transform: translate(0%, 200px);
}

.modal-popup .popup-header {
display: flex;
justify-content: flex-end;
}

.modal-popup .popup-content {
padding: 0 15px;
}
3 changes: 3 additions & 0 deletions src/css/site.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

@import "typeface-gotham.css";
@import "typeface-roboto-mono.css";
@import "vars.css";
Expand All @@ -17,3 +18,5 @@
@import "optanon.css";
@import "highlight.css";
@import "feedback.css";
@import "is-this-helpful.css";
@import "table.css";
Loading