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

fix(tup-231): move some core-styles back to core-cms #17

Merged
merged 13 commits into from
May 3, 2022

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Apr 28, 2022

Overview / Changes

Move back CMS-specific styles from Core-Styles repo to Core-CMS repo.

Background

I moved all styles from Core-CMS to Core-Styles. That included some CMS-specific styles. Now I bring them back to CMS.

Also, better documented current1 state of <tacc-search-bar>.

Related

Screenshots

N/A

Testing

See TACC/Core-CMS#482.

Footnotes

  1. State changes (improves) via https://github.com/TACC/Core-CMS/issues/101.

Some Core-CMS styles were in Core-Styles repo, because I moved too much.

Cause: "FP-1496: CSS Build to Core-Styles" (v3.6.0 Core-Styles)
@wesleyboar wesleyboar force-pushed the task/TUP-231-cms-css-from-styles-repo-to-cms-repo branch from c6f6e73 to 4039446 Compare April 28, 2022 18:38
@wesleyboar wesleyboar force-pushed the task/TUP-231-cms-css-from-styles-repo-to-cms-repo branch from 29bc1ac to 67ebbb8 Compare April 28, 2022 18:52
Copy link
Member Author

@wesleyboar wesleyboar left a comment

Choose a reason for hiding this comment

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

notes for reviewers

Comment on lines 1 to 11
/*
Django CMS Blog Components

Components for [Django CMS Blog](https://djangocms-blog.readthedocs.io) UI. These classes are authored in templates of third-party origin, but they have no third-party styles.

Reference:

- [Django CMS Blog `.blog-` Class Components](https://github.com/TACC/CORE-cms/tree/main/taccsite_cms/templates/djangocms_blog)

Styleguide Components.DjangoCMS.Blog
*/
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied entire file to TACC/Core-CMS:/...)

Comment on lines -1 to -34
/*
Django CMS Components

Components for [Django CMS](https://www.django-cms.org/) UI. No examples
are provided, because the markup is dynamically generated by a third-party.

Reference:

- [Django CMS `.cms-` Class Components](https://github.com/divio/django-cms/tree/release/3.6.x/cms/static/cms/sass/components)

Styleguide Components.DjangoCMS
*/

/* Prevent excess scrollbar when logged into Django CMS */
/* NOTE: This code does NOT work */
/*
.cms-ready body {
/* FAQ: CMS dynamically adds `margin-top` to `head` to fit toolbar height *\/
/* WARNING: If the dynamic(!) header margin changes, then so should this *\/
/* RFC: Consider creating JavaScript snippet (via CMS?) to solve this *\/
height: calc(100vh - env(--cms-toolbar-height));
}
*/

/* Prevent anchor links from scrolling behind Django CMS header */
.cms-ready :target {
scroll-margin-top: env(--cms-toolbar-height);
}

/* Prevent top-sticking content from scrolling behind Django CMS header */
.cms-ready .sticky-top /* Bootstrap class */,
.cms-ready .position-sticky.fixed-top /* Bootstrap class */ {
top: env(--cms-toolbar-height);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied entire file to TACC/Core-CMS:/...)

Comment on lines 1 to 11
/*
Django CMS Blog Post Components

Components for [Django CMS Blog Post](https://djangocms-blog.readthedocs.io) UI. These classes are authored in templates of third-party origin, and expanded by us, but they have no third-party styles.

Reference:

- [Django CMS Blog `.post-` Class Components](https://github.com/TACC/CORE-cms/tree/main/taccsite_cms/templates/djangocms_blog)

Styleguide Components.DjangoCMS.Post
*/
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied entire file to TACC/Core-CMS:/...)

Comment on lines -1 to -54
/*
Fonts

Load standard fonts for a TACC website.

Usage:
```
.something {
// BentonSans-MediumItalic
font-family: 'Benton Sans';
font-weight: 500;
font-style: italic;
}
```

Reference:
- [Keep Font CSS Simple](https://www.456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple/)
- [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
- [Shared UI - Constants - Font](https://confluence.tacc.utexas.edu/x/cYAZCg)

Styleguide Generics.Fonts
*/

@font-face {
font-family: 'Benton Sans';
src: url("/static/frontera-cms/fonts/archive/BentonSans-Regular.otf") format("opentype");
font-weight: 400;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Benton Sans';
src: url("/static/frontera-cms/fonts/archive/BentonSans-Bold.otf") format("opentype");
font-weight: 700;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Benton Sans';
src: url("/static/frontera-cms/fonts/archive/BentonSans-Medium.otf") format("opentype");
font-weight: 500;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Benton Sans';
src: url("/static/frontera-cms/fonts/archive/BentonSans-MediumItalic.otf") format("opentype");
font-weight: 500;
font-style: italic;
font-display: swap;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied entire file to TACC/Core-CMS:/...)

Comment on lines -33 to -44

/* Distinct Hues */

/* FAQ: This placeholder accent color came from Portal */
/* CAVEAT: A standard accent color definition is pending more designs */
/* NOTE: The new Frontera and TACC designs both have brown and blue accents */
--global-color-accent--normal: #877453;

/* CAVEAT: Not accessible within paragraph text (edge case as of 2021-08) */
--global-color-link-on-light--normal: #003399;
/* WARNING: This color is from Dev not Design (not rendered as of 2021-08) */
--global-color-link-on-dark--normal: #0088FF;
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied these CMS-only properties to TACC/Core-CMS:/...)

Comment on lines -23 to -41



/* Family */

--global-font-family--sans: "Benton Sans", "Roboto", sans-serif;
--global-font-family--serif: Times, sans-serif;
--global-font-family--mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;

--global-font-family: var(--global-font-family--sans);

/* Family: Overwrite Boostrap */

--font-family-sans-serif: var(--global-font-family--sans);
/* CAVEAT: Ineffectual for <code>, <kbd>, <pre>, <samp> */
--font-family-monospace: var(--global-font-family--mono);



Copy link
Member Author

Choose a reason for hiding this comment

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

(copied these CMS-only properties to TACC/Core-CMS:/...)

@@ -32,5 +32,4 @@ Styleguide Settings.CustomProperties.Space

--global-space--list-indent: 40px; /* browser default (Firefox, Edge) */
--global-space--grid-gap: 15px; /* Bootstrap `.container` & `.row` */
--global-space--hr-margin: 30px; /* constant unit allows consistency */
Copy link
Member Author

Choose a reason for hiding this comment

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

(copied this CMS-only properties to TACC/Core-CMS:/...)

@wesleyboar wesleyboar changed the title TUP-231: Move CMS CSS from Core Styles to Core CMS TUP-231: (Part 1 of N) Move CMS CSS from Core Styles to Core CMS Apr 28, 2022
@wesleyboar wesleyboar changed the title TUP-231: (Part 1 of N) Move CMS CSS from Core Styles to Core CMS TUP-231: Part 1 of N toward Core-UI (Core-CMS / Core-Styles Accuracy) Apr 28, 2022
@wesleyboar wesleyboar changed the title TUP-231: Part 1 of N toward Core-UI (Core-CMS / Core-Styles Accuracy) TUP-231: Part 1 of N toward Core-UI (Fix Core-CMS / Core-Styles Inaccuracy) Apr 28, 2022
@wesleyboar wesleyboar marked this pull request as ready for review April 28, 2022 23:31
@wesleyboar wesleyboar changed the title TUP-231: Part 1 of N toward Core-UI (Fix Core-CMS / Core-Styles Inaccuracy) TUP-231: Part 1 of N to Core-UI (Fix Core-CMS / Core-Styles Inaccuracy) Apr 29, 2022
@wesleyboar wesleyboar changed the title TUP-231: Part 1 of N to Core-UI (Fix Core-CMS / Core-Styles Inaccuracy) TUP-231: Part 1 of N to Core-UI (Fix Core-CMS / Core-Styles Mismatch) Apr 29, 2022
Copy link
Collaborator

@taoteg taoteg left a comment

Choose a reason for hiding this comment

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

LGTM.

@wesleyboar
Copy link
Member Author

Merged in main. Went smooth. Merging because this and Core-CMS PR are approved.

@wesleyboar wesleyboar merged commit 6c3a984 into main May 3, 2022
@wesleyboar wesleyboar deleted the task/TUP-231-cms-css-from-styles-repo-to-cms-repo branch May 3, 2022 19:35
@wesleyboar wesleyboar changed the title TUP-231: Part 1 of N to Core-UI (Fix Core-CMS / Core-Styles Mismatch) fix(tup-231): move some core-styles back to core-cms May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants