Skip to content

Commit

Permalink
Merge pull request #730 from primer/release-12.2.1
Browse files Browse the repository at this point in the history
Release 12.2.1
  • Loading branch information
simurai authored Mar 22, 2019
2 parents 5e3f7eb + 1672642 commit 09674e3
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 138 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# 12.2.1

### :bug: Bug Fix
- Fix source order of directional border utilities [#727](https://github.com/primer/css/pull/727)
- Fix UnderlineNav selected border width [#733](https://github.com/primer/css/pull/733)

### :memo: Documentation
- Fix changelog committers listings for versions 12.0.1 and 12.0.2 [#729](https://github.com/primer/css/pull/729)
- Fix code examples from being cut off [#725](https://github.com/primer/css/pull/725)

### :house: Internal
- Prevent Storybook publish failures from breaking builds on `master` [#728](https://github.com/primer/css/pull/728)

#### Committers: 2
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
- Simurai ([simurai](https://github.com/simurai))

# 12.2.0

### :rocket: Enhancement
Expand All @@ -17,9 +34,9 @@

#### Committers: 4
- Diana Mounter ([broccolini](https://github.com/broccolini))
- Max Stoiber ([https://github.com/mxstbr](mxstbr))
- Max Stoiber ([mxstbr](https://github.com/mxstbr))
- Shawn Allen ([shawnbot](https://github.com/shawnbot))
- Simurai ([https://github.com/simurai](simurai))
- Simurai ([simurai](https://github.com/simurai))

# 12.1.1

Expand Down
2 changes: 1 addition & 1 deletion docs/CodeExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function CodeExample(props) {
return (
<LiveProvider {...liveProps}>
<BorderBox {...rest}>
<BorderBox bg="white" p={3} border={0} borderBottom={1} borderRadius={0}>
<BorderBox bg="white" border={0} borderBottom={1} borderRadius={0}>
<Frame>
<LivePreview />
</Frame>
Expand Down
3 changes: 2 additions & 1 deletion docs/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {assetPrefix} from './utils'

export default class Frame extends React.Component {
static defaultProps = {
display: 'block',
border: 0,
borderRadius: 0,
minHeight: 0,
Expand Down Expand Up @@ -40,7 +41,7 @@ export default class Frame extends React.Component {
return (
<Measure bounds onResize={rect => this.setHeight(rect.bounds.height)}>
{({measureRef}) => (
<div ref={measureRef} style={{overflow: 'auto'}}>
<div ref={measureRef} className="p-3 overflow-auto">
{children}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/css",
"version": "12.2.0",
"version": "12.2.1",
"description": "Primer is the CSS framework that powers GitHub's front-end design. primer includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.",
"homepage": "https://primer.style/css",
"author": "GitHub, Inc.",
Expand Down
2 changes: 1 addition & 1 deletion pages/css/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Use the `.select-sm` class to resize both default and custom `<select>`s to matc
Convey errors and warnings for form groups. Add the appropriate class—either `.errored` or `.warn`—to the `<dl class="form-group">` to start. Then, house your error messaging in an additional `<dd>` with either `.error` or `.warning`.

```html
<form>
<form class="pb-2">
<dl class="form-group errored">
<dt><label for="example-text-errored">Example Text</label></dt>
<dd><input class="form-control" type="text" value="Example Value" id="example-text-errored" aria-describedby="form-error-text"></dd>
Expand Down
2 changes: 0 additions & 2 deletions pages/css/components/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,3 @@ Counters can also be used in `Box` headers to indicate the number of items in a
</ul>
</div>
```


19 changes: 9 additions & 10 deletions pages/css/components/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Defaults to caret oriented top-center.
```html title="Default (top-center)"
<div class="position-relative text-center">
<button class="btn btn-primary">UI</button>
<div class="Popover right-0 left-0">
<div class="Popover right-0 left-0 position-relative">
<div class="Popover-message text-left p-4 mt-2 mx-auto Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
<p>Message about this particular piece of UI.</p>
Expand All @@ -66,7 +66,7 @@ Defaults to caret oriented top-center.
```html title="Large"
<div class="position-relative text-center">
<button class="btn btn-primary">UI</button>
<div class="Popover right-0 left-0">
<div class="Popover right-0 left-0 position-relative">
<div class="Popover-message Popover-message--large text-left p-4 mt-2 Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
<p>Message about this particular piece of UI.</p>
Expand Down Expand Up @@ -94,7 +94,7 @@ Defaults to caret oriented top-center.
### Bottom-right

```html title="Bottom-right"
<div class="position-relative text-right">
<div class="position-relative text-right pr-2">
<div class="Popover position-relative">
<div class="Popover-message Popover-message--bottom-right p-4 mb-2 text-left Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
Expand All @@ -109,14 +109,14 @@ Defaults to caret oriented top-center.
### Bottom-left

```html title="Bottom-left"
<div class="Popover position-relative">
<div class="Popover position-relative pl-2">
<div class="Popover-message Popover-message--bottom-left p-4 mb-2 Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
<p>Message about this particular piece of UI.</p>
<button type="submit" class="btn btn-outline mt-2 text-bold">Got it!</button>
</div>
<button class="btn btn-primary">UI</button>
</div>
<button class="btn btn-primary">UI</button>
```

### Left
Expand Down Expand Up @@ -212,9 +212,9 @@ Defaults to caret oriented top-center.
### Top-left

```html title="Top-left"
<div class="position-relative">
<div class="position-relative pl-2">
<button class="btn btn-primary">UI</button>
<div class="Popover">
<div class="Popover position-relative">
<div class="Popover-message Popover-message--top-left p-4 mt-2 Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
<p>Message about this particular piece of UI.</p>
Expand All @@ -227,9 +227,9 @@ Defaults to caret oriented top-center.
### Top-right

```html title="Top-right"
<div class="position-relative text-right">
<div class="position-relative text-right pr-2">
<button class="btn btn-primary">UI</button>
<div class="Popover right-0">
<div class="Popover right-0 position-relative">
<div class="Popover-message Popover-message--top-right text-left p-4 mt-2 Box box-shadow-large">
<h4 class="mb-2">Popover heading</h4>
<p>Message about this particular piece of UI.</p>
Expand All @@ -238,4 +238,3 @@ Defaults to caret oriented top-center.
</div>
</div>
```

143 changes: 75 additions & 68 deletions pages/css/components/tooltips.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,90 +24,97 @@ Before adding a tooltip, please consider: Is this information essential and nece
## Tooltip direction
Specify the direction of a tooltip with north, south, east, and west directions:

- `.tooltipped-n`
- `.tooltipped-ne`
- `.tooltipped-e`
- `.tooltipped-se`
- `.tooltipped-s`
- `.tooltipped-sw`
- `.tooltipped-w`
- `.tooltipped-nw`


```html
<span class="tooltipped tooltipped-n border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the North side.">
Tooltip North
</span>
<span class="tooltipped tooltipped-ne border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the North East side.">
Tooltip North East
</span>
<span class="tooltipped tooltipped-e border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the East side.">
Tooltip East
</span>
<span class="tooltipped tooltipped-se border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the South East side.">
Tooltip South East
</span>
<span class="tooltipped tooltipped-s border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the South side.">
Tooltip South
</span>
<span class="tooltipped tooltipped-sw border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the South West side.">
Tooltip South West
</span>
<span class="tooltipped tooltipped-w border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the West side.">
Tooltip West
</span>
<span class="tooltipped tooltipped-nw border p-2 mb-2 mr-2 float-left" aria-label="This is the tooltip on the North West side.">
Tooltip North West
</span>
<div class="d-flex flex-justify-center pt-4">
<span class="tooltipped tooltipped-nw m-2 p-2 border" aria-label="This is the tooltip on the North West side.">
.tooltipped-nw
</span>
<span class="tooltipped tooltipped-n m-2 p-2 border" aria-label="This is the tooltip on the North side.">
.tooltipped-n
</span>
<span class="tooltipped tooltipped-ne m-2 p-2 border" aria-label="This is the tooltip on the North East side.">
.tooltipped-ne
</span>
</div>
<div class="d-flex flex-justify-center">
<span class="tooltipped tooltipped-w m-2 p-2 border" aria-label="This is the tooltip on the West side.">
.tooltipped-w
</span>
<span class="tooltipped tooltipped-e m-2 p-2 border" aria-label="This is the tooltip on the East side.">
.tooltipped-e
</span>
</div>
<div class="d-flex flex-justify-center pb-4">
<span class="tooltipped tooltipped-sw m-2 p-2 border" aria-label="This is the tooltip on the South West side.">
.tooltipped-sw
</span>
<span class="tooltipped tooltipped-s m-2 p-2 border" aria-label="This is the tooltip on the South side.">
.tooltipped-s
</span>
<span class="tooltipped tooltipped-se m-2 p-2 border" aria-label="This is the tooltip on the South East side.">
.tooltipped-se
</span>
</div>
```

## Tooltip alignment
Align tooltips to the left or right of an element, combined with a directional class to specify north or south.
Align tooltips to the left or right of an element, combined with a directional class to specify north or south. Use a modifier of `1` or `2` to choose how much the tooltip's arrow is indented.

```html
<span class="tooltipped tooltipped-ne tooltipped-align-left-1 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped NE and aligned left.">
Tooltip North East align left 1
</span>
<span class="tooltipped tooltipped-ne tooltipped-align-left-2 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped NE and aligned left.">
Tooltip North East align left 2
</span>
<span class="tooltipped tooltipped-se tooltipped-align-left-1 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped SW and aigned left.">
Tooltip South East align left 1
</span>
<span class="tooltipped tooltipped-se tooltipped-align-left-2 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped SW and aigned left.">
Tooltip South East align left 2
</span>
<span class="tooltipped tooltipped-nw tooltipped-align-right-1 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped NW and aligned right.">
Tooltip North West align right 1
</span>
<span class="tooltipped tooltipped-nw tooltipped-align-right-2 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped NW and aligned right.">
Tooltip North West align right 2
</span>
<span class="tooltipped tooltipped-sw tooltipped-align-right-1 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped SE and aligned right.">
Tooltip South West align right 1
</span>
<span class="tooltipped tooltipped-sw tooltipped-align-right-2 border p-2 mb-2 mr-2 float-left" aria-label="Tooltipped SE and aligned right.">
Tooltip South West align right 2
</span>
<div class="d-flex flex-justify-center pt-4">
<span class="tooltipped tooltipped-nw tooltipped-align-right-1 m-2 p-2 border" aria-label="Tooltipped NW and aligned right.">
.tooltipped-nw .tooltipped-align-right-1
</span>
<span class="tooltipped tooltipped-ne tooltipped-align-left-1 m-2 p-2 border" aria-label="Tooltipped NE and aligned left.">
.tooltipped-ne .tooltipped-align-left-1
</span>
</div>
<div class="d-flex flex-justify-center">
<span class="tooltipped tooltipped-nw tooltipped-align-right-2 m-2 p-2 border" aria-label="Tooltipped NW and aligned right.">
.tooltipped-nw .tooltipped-align-right-2
</span>
<span class="tooltipped tooltipped-ne tooltipped-align-left-2 m-2 p-2 border" aria-label="Tooltipped NE and aligned left.">
.tooltipped-ne .tooltipped-align-left-2
</span>
</div>
<div class="d-flex flex-justify-center">
<span class="tooltipped tooltipped-sw tooltipped-align-right-1 m-2 p-2 border" aria-label="Tooltipped SE and aligned right.">
.tooltipped-sw .tooltipped-align-right-1
</span>
<span class="tooltipped tooltipped-se tooltipped-align-left-1 m-2 p-2 border" aria-label="Tooltipped SW and aigned left.">
.tooltipped-se .tooltipped-align-left-1
</span>
</div>
<div class="d-flex flex-justify-center pb-4">
<span class="tooltipped tooltipped-sw tooltipped-align-right-2 m-2 p-2 border" aria-label="Tooltipped SE and aligned right.">
.tooltipped-sw .tooltipped-align-right-2
</span>
<span class="tooltipped tooltipped-se tooltipped-align-left-2 m-2 p-2 border" aria-label="Tooltipped SW and aigned left.">
.tooltipped-se .tooltipped-align-left-2
</span>
</div>
```

## Tooltips with multiple lines
Use `.tooltipped-multiline` when you have long content. This style has some limitations: you cannot pre-format the text with newlines, and tooltips are limited to a max-width of `250px`.


```html
<span class="tooltipped tooltipped-multiline tooltipped-n border p-2" aria-label="This is the tooltip with multiple lines. This is the tooltip with multiple lines.">
Tooltip with multiple lines
</span>
<div class="d-flex flex-justify-center pt-6">
<span class="tooltipped tooltipped-n tooltipped-multiline m-2 p-2 border" aria-label="This is the tooltip with multiple lines. This is the tooltip with multiple lines.">
.tooltipped-multiline
</span>
</div>
```

## Tooltips No Delay
## Tooltips with no delay

By default the tooltips have a slight delay before appearing. This is to keep multiple tooltips in the UI from being distracting. There is a modifier class you can use to override this. `.tooltipped-no-delay`
By default the tooltips have a slight delay before appearing. This is to keep multiple tooltips in the UI from being distracting. There is a `.tooltipped-no-delay` modifier class you can use to override this.

```html
<span class="tooltipped tooltipped-n tooltipped-no-delay border p-2" aria-label="This is the tooltip on the no delay side.">
Tooltip no delay
</span>
<div class="d-flex flex-justify-center pt-4">
<span class="tooltipped tooltipped-n tooltipped-no-delay m-2 p-2 border" aria-label="This is the tooltip on the no delay side.">
.tooltipped-no-delay
</span>
</div>
```

20 changes: 10 additions & 10 deletions pages/css/utilities/borders.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,36 +115,36 @@ Use `.border-white-fade-xx` to add a white border with various levels of alpha t

```html
<div class="bg-gray-dark text-white p-3 mb-3">
<div class="border border-white-fade-15 p-2 mb-2">
<div class="border-bottom border-white-fade-15 p-2 mb-2">
.border-white-fade-15
</div>
<div class="border border-white-fade-30 p-2 mb-2">
<div class="border-bottom border-white-fade-30 p-2 mb-2">
.border-white-fade-30
</div>
<div class="border border-white-fade-50 p-2 mb-2">
<div class="border-bottom border-white-fade-50 p-2 mb-2">
.border-white-fade-50
</div>
<div class="border border-white-fade-70 p-2 mb-2">
<div class="border-bottom border-white-fade-70 p-2 mb-2">
.border-white-fade-70
</div>
<div class="border border-white-fade-85 p-2 mb-2">
<div class="border-bottom border-white-fade-85 p-2 mb-2">
.border-white-fade-85
</div>
</div>
<div class="bg-blue text-white p-3">
<div class="border border-white-fade-15 p-2 mb-2">
<div class="border-bottom border-white-fade-15 p-2 mb-2">
.border-white-fade-15
</div>
<div class="border border-white-fade-30 p-2 mb-2">
<div class="border-bottom border-white-fade-30 p-2 mb-2">
.border-white-fade-30
</div>
<div class="border border-white-fade-50 p-2 mb-2">
<div class="border-bottom border-white-fade-50 p-2 mb-2">
.border-white-fade-50
</div>
<div class="border border-white-fade-70 p-2 mb-2">
<div class="border-bottom border-white-fade-70 p-2 mb-2">
.border-white-fade-70
</div>
<div class="border border-white-fade-85 p-2 mb-2">
<div class="border-bottom border-white-fade-85 p-2 mb-2">
.border-white-fade-85
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions pages/css/utilities/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,13 @@ Use `.position-absolute` to take elements out of the normal document flow.

Use `.position-fixed` to position an element relative to the viewport. **Be careful when using fixed positioning. It is tricky to use and can lead to unwanted side effects.**

_Note: fixed positioning has been disabled here for demonstration only._
_Note: This example is shown in an `<iframe>` and therefore will not be positioned to the viewport of this page._

```html
<div class="position-fixed bg-gray-light border-bottom border-gray p-3">
.position-fixed
<div style="height: 64px;">
<div class="position-fixed right-0 bottom-0 bg-gray-light border p-2">
.position-fixed
</div>
</div>
```

Expand Down
6 changes: 3 additions & 3 deletions pages/css/utilities/marketing-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ In an effort to reduce the size of our CSS, responsive breakpoints are only supp
Using column offset classes can pull a div over X number of columns to the left. Negative offsets are available in [spacings from 1](../support/spacing/#spacing-scale) [to 7](../support/marketing-variables/).

```html
<div class="clearfix">
<div class="offset-n1 col-3 border p-3">.offset-n1</div>
<div class="offset-n2 col-3 border p-3">.offset-n2</div>
<div class="mx-auto border" style="width: 300px">
<div class="offset-n1 col-4 border p-3">.offset-n1</div>
<div class="offset-n2 col-4 border p-3">.offset-n2</div>
</div>
```
Loading

0 comments on commit 09674e3

Please sign in to comment.