Skip to content

Commit

Permalink
Merge pull request #143 from openstax/k12-604/Family-support-material…
Browse files Browse the repository at this point in the history
…-links-styling

Add styling for family support material links
  • Loading branch information
MReyna12 authored Jan 30, 2024
2 parents cc84457 + feaaad0 commit cce2c85
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Binary file added docs/static/familysupportmaterialslinks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docs/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [Extra Support Box](#extra-support-box)
- [Accordion](#accordion-os-raise-accordion)
- [Student Reflection Box](#student-reflection-box)
- [Family Support Materials Links](#family-support-materials-links)
* Text Styling
- [Bold Text](#bold-text)
- [Italicize Text](#italicize-text)
Expand Down Expand Up @@ -888,6 +889,30 @@ Student Reflection Box Side-by-Side

---

## Family Support Materials Links

Add a styled container and sentence for family support materials links.

**Examples**

<div style="text-align: center;">
<img src="./static/familysupportmaterialslinks.png" width="750">
</div>

**Availability**

Family support materials links should only be used in `<div>` elements. There should only ever be a single `<p>`, with an `<a>` to hyperlink the relevant text inside of the `<div>`.

**Usage**

```html
<div class="os-raise-familysupport">
<p>Access the PDF version of this page to share with parents or guardians: <a href="">Unit 1 Family Support Materials.</a></p>
</div>
```

---

# Flex

## Initializing Flexbox (os-raise-d-flex-nowrap / os-raise-d-flex)
Expand Down
22 changes: 22 additions & 0 deletions src/styles/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,25 @@ $arrow-svg: url("data:image/svg+xml,%3Csvg width='16' height='9' viewBox='0 0 16
font-weight: 700;
font-size: 1.25rem;
}

// Family Support Materials
.os-raise-familysupport {
display: flex;
align-items: center;
border: .125rem solid $os-dark-green;
border-radius: .5rem;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='52' viewBox='0 0 56 56'%3E%3Cpath fill='%230a5b50' d='M15.555 53.125h24.89c4.852 0 7.266-2.461 7.266-7.336V24.508c0-3.024-.328-4.336-2.203-6.258L32.57 5.102c-1.78-1.829-3.234-2.227-5.882-2.227H15.555c-4.828 0-7.266 2.484-7.266 7.36v35.554c0 4.898 2.438 7.336 7.266 7.336m.187-3.773c-2.414 0-3.68-1.29-3.68-3.633V10.305c0-2.32 1.266-3.657 3.704-3.657h10.406v13.618c0 2.953 1.5 4.406 4.406 4.406h13.36v21.047c0 2.343-1.243 3.633-3.68 3.633ZM31 21.132c-.914 0-1.29-.374-1.29-1.312V7.375l13.5 13.758Zm5.625 9.985h-17.79c-.843 0-1.452.633-1.452 1.43c0 .82.61 1.453 1.453 1.453h17.789a1.43 1.43 0 0 0 1.453-1.453c0-.797-.633-1.43-1.453-1.43m0 8.18h-17.79c-.843 0-1.452.656-1.452 1.476c0 .797.61 1.407 1.453 1.407h17.789c.82 0 1.453-.61 1.453-1.407c0-.82-.633-1.476-1.453-1.476'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: 1rem 50%;
background-size: 1.5rem;
min-height: 3.5rem;
padding-left: 3.5rem;
margin-bottom: 1rem;
}

.os-raise-familysupport p {
color: $raise-light-black;
font-weight: 700;
font-size: .875rem;
margin-bottom: 0;
}

0 comments on commit cce2c85

Please sign in to comment.