Skip to content

Commit

Permalink
feat/tup-648 Migrate u-header from tup-ui to core-stlyes (#261)
Browse files Browse the repository at this point in the history
* Added demo and style for u-highlight.

* Update src/lib/_imports/trumps/u-highlight/readme.md

Co-authored-by: Wesley B <62723358+wesleyboar@users.noreply.github.com>

* Adjusting demo to only showcase highlight

* adjusted to comments

added u-highlight container max-width, and u-highlight padding-inline.

---------

Co-authored-by: Wesley B <62723358+wesleyboar@users.noreply.github.com>
  • Loading branch information
R-Tomas-Gonzalez and wesleyboar authored Nov 16, 2023
1 parent 3149826 commit b00917b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/core-styles.base.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/trumps/u-highlight.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/trumps/u-highlight/u-highlight.demo.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/lib/_imports/core-styles.base.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@
@import url("./trumps/u-empty.css");
@import url("./trumps/s-irregular-links.css");
@import url("./trumps/u-mailto-text-replace.css");
@import url("./trumps/u-highlight.css")
8 changes: 8 additions & 0 deletions src/lib/_imports/trumps/u-highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.u-highlight {
/* So wrapped inline text has consistent padding */
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
:is(h1, h2, h3, h4).u-highlight {
display: inline;
}
5 changes: 5 additions & 0 deletions src/lib/_imports/trumps/u-highlight/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To style the highlighting behind text.
**Use Cases:**
- The hero image text on the [TACC homepage](https://www.tacc.utexas.edu/)

`display: inline` is required to keep highlight behind text only, instead of filling the container the text is within.
11 changes: 11 additions & 0 deletions src/lib/_imports/trumps/u-highlight/u-highlight.demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.u-highlight-container {
max-width: 800px;
}

.u-highlight {
padding-inline: 10px;
color: var(--global-color-primary--xx-light);
background-color: var(--global-color-primary--xxx-dark);
line-height: 1;
text-transform: uppercase;
}
4 changes: 4 additions & 0 deletions src/lib/_imports/trumps/u-highlight/u-highlight.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="u-highlight-container">
<h2 class="u-highlight">Going Strong: Computational researchers present
findings at third Frontera User Meeting</h2>
</div>

0 comments on commit b00917b

Please sign in to comment.