From 7b229401abb6620dfe6939653f5d46f82722a3da Mon Sep 17 00:00:00 2001 From: Wesley B <62723358+wesleyboar@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:15:30 -0600 Subject: [PATCH] feat: tup-463 migrate css to core - misc bugs (#384) * chore: search dropdown should use var for white * fix: footer buttons should not have width limit * refactor: deprecate `` in footer buttons * fix!: do not let search styles bleed beyond search Requires an `id="tacc-google-search` wrapper. * fix: remove unnecessary style The only `

` on the page is "Search" text provided by CMS not Google. * docs: explain strange, complex search css selector * fix: core-styles v2.22.0 to v2.22.1 * chore: core-styles v2.22.1 to v2.22.2 --- apps/tup-cms/Dockerfile | 4 ++-- .../for-core-cms/trumps/search-elements.css | 14 +++++--------- .../css/for-tup-cms/components/c-footer.css | 18 ++++++++++++++++++ package-lock.json | 13 +++++++------ package.json | 2 +- 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/apps/tup-cms/Dockerfile b/apps/tup-cms/Dockerfile index a5bdb4931..ce372dc56 100644 --- a/apps/tup-cms/Dockerfile +++ b/apps/tup-cms/Dockerfile @@ -1,5 +1,5 @@ -# TACC/Core-CMS#678 (core-styles v2.11 to v2.22; migrate css to core-cms|styles) -FROM taccwma/core-cms:d7b7407 +# TACC/Core-CMS#753 (core-styles v2.11 to v2.22; migrate css to core-cms|styles) +FROM taccwma/core-cms:fcb82f2 WORKDIR /code diff --git a/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-core-cms/trumps/search-elements.css b/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-core-cms/trumps/search-elements.css index c8e47c248..8e0da5782 100644 --- a/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-core-cms/trumps/search-elements.css +++ b/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-core-cms/trumps/search-elements.css @@ -1,15 +1,10 @@ -#cms-content { +#tacc-google-search { /* Whole Search Container */ /* removes padding from search container */ & .gsc-control-cse { padding: unset; } - /* make header same as news */ - & h1 { - color: var(--global-color-primary--x-dark); - } - @@ -27,7 +22,8 @@ border-bottom: unset; } - & tbody>tr:first-child>:is(td, th) { + /* To override Core-Styles tables */ + & tbody > tr:first-child > :is(td, th) { border: unset; padding-inline: unset; background: unset; @@ -35,7 +31,7 @@ } & .gsc-selected-option-container { - background: #fff; + background: var(--global-color-primary--xx-light); border: var(--global-border--normal); } @@ -134,4 +130,4 @@ vertical-align: unset; top: 1px; } -} \ No newline at end of file +} diff --git a/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-tup-cms/components/c-footer.css b/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-tup-cms/components/c-footer.css index 756e23b1b..74e18b09c 100644 --- a/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-tup-cms/components/c-footer.css +++ b/apps/tup-cms/src/taccsite_custom/tup_cms/static/tup_cms/css/for-tup-cms/components/c-footer.css @@ -11,6 +11,24 @@ svg { +/* BUTTONS */ + +/* To style buttons differently than in body */ +.c-footer .c-button, +.c-footer [class*="button--"] { + --max-width: auto; /* override core-styles.base.css */ + font-size: 80%; /* mimic Botstrap .small and */ + + /* TODO: (1) Remove from footer buttons (2) Remove this font-size */ + & small { + font-size: inherit; /* gracefully deprecate use of */ + } +} + + + + + /* LOGOS */ /* To set baseline styles for footer logos */ diff --git a/package-lock.json b/package-lock.json index bb0361148..1622f806e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "@nx/vite": "16.5.3", "@nx/web": "16.5.3", "@nx/workspace": "16.5.3", - "@tacc/core-styles": "github:TACC/Core-Styles#a06f5af", + "@tacc/core-styles": "^2.22.2", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", @@ -5502,10 +5502,10 @@ } }, "node_modules/@tacc/core-styles": { - "version": "2.22.0", - "resolved": "git+ssh://git@github.com/TACC/Core-Styles.git#a06f5afb12b027dd71470d5ab50c198c9b403697", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/@tacc/core-styles/-/core-styles-2.22.2.tgz", + "integrity": "sha512-r2QTrZOcUZIjSIcOLktluGhPzGxvYNTEOKF7h6gYmQn8tgiFcesw4xzoIDCVynA5WpaPMZ2jkV3wM+M7SoBd9Q==", "dev": true, - "license": "MIT", "bin": { "core-styles": "src/cli.js" }, @@ -25541,9 +25541,10 @@ } }, "@tacc/core-styles": { - "version": "git+ssh://git@github.com/TACC/Core-Styles.git#a06f5afb12b027dd71470d5ab50c198c9b403697", + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/@tacc/core-styles/-/core-styles-2.22.2.tgz", + "integrity": "sha512-r2QTrZOcUZIjSIcOLktluGhPzGxvYNTEOKF7h6gYmQn8tgiFcesw4xzoIDCVynA5WpaPMZ2jkV3wM+M7SoBd9Q==", "dev": true, - "from": "@tacc/core-styles@github:TACC/Core-Styles#a06f5af", "requires": {} }, "@tanstack/query-core": { diff --git a/package.json b/package.json index 403ebacd7..cebb32d2f 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@nx/vite": "16.5.3", "@nx/web": "16.5.3", "@nx/workspace": "16.5.3", - "@tacc/core-styles": "github:TACC/Core-Styles#a06f5af", + "@tacc/core-styles": "^2.22.2", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3",