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

feat/tup-648 Migrate u-highlight from tup-ui to core-stlyes #261

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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 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.
15 changes: 15 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,15 @@
[class*="tag--"] {
display: block;
margin-bottom: 2.0rem;
color: var(--global-color-primary--xx-light);
font-size: var(--global-font-size--small);
background: var(--global-color-accent--normal);
}

.u-highlight {
padding-inline: var(--tag-padding);
R-Tomas-Gonzalez marked this conversation as resolved.
Show resolved Hide resolved
color: var(--global-color-primary--xx-light);
background-color: var(--global-color-primary--xxx-dark);
line-height: 1;
text-transform: uppercase;
}
7 changes: 7 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,7 @@
<figcaption>
<div class="container">
<span class="tag--feature">Feature Story</span>
<h2 class="u-highlight">Going Strong: Computational researchers present
findings at third Frontera User Meeting</h2>
</div>
</figcaption>