Skip to content

Commit

Permalink
Merge branch 'master' into progress-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored Mar 11, 2020
2 parents 444f8d6 + 5e5e096 commit 7b3f0c8
Show file tree
Hide file tree
Showing 36 changed files with 633 additions and 270 deletions.
117 changes: 79 additions & 38 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,15 @@ in code
<summary>Source code</summary>

```scss
$carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2));
$carbon--aspect-ratios: (
(16, 9),
(9, 16),
(2, 1),
(1, 2),
(4, 3),
(3, 4),
(1, 1)
);
```

</details>
Expand All @@ -1506,36 +1514,53 @@ $carbon--aspect-ratios: ((16, 9), (2, 1), (4, 3), (1, 1), (1, 2));

### ❌carbon--aspect-ratio [mixin]

Output the CSS classes for generating aspect ratio classes
Generates the CSS classname utilities for the aspect ratios

CSS Tricks article on aspect ratios and all the different ways it can be done.
https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6

That article references an earlier article on the topic.
https://keithjgrant.com/posts/2017/03/aspect-ratios/

<details>
<summary>Source code</summary>

```scss
@mixin carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios) {
@mixin carbon--aspect-ratio($width, $height) {
.#{$prefix}--aspect-ratio {
height: 0;
position: relative;
}

.#{$prefix}--aspect-ratio::before {
content: '';
width: 1px;
margin-left: -1px;
float: left;
height: 0;
}

.#{$prefix}--aspect-ratio::after {
content: '';
display: table;
clear: both;
}

@each $aspect-ratio in $aspect-ratios {
$width: nth($aspect-ratio, 1);
$height: nth($aspect-ratio, 2);

.#{$prefix}--aspect-ratio--#{$width}x#{$height}::before {
padding-top: percentage($height / $width);
}
}

// leaving here for legacy support
.#{$prefix}--aspect-ratio--object {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}

@each $ratio in $aspect-ratios {
$width: nth($ratio, 1);
$height: nth($ratio, 2);

.#{$prefix}--aspect-ratio--#{$width}x#{$height} {
padding-bottom: percentage($height / $width);
}
}
}
```
Expand All @@ -1544,9 +1569,10 @@ Output the CSS classes for generating aspect ratio classes

- **Parameters**:

| Name | Description | Type | Default value |
| ---------------- | ----------------------------------- | ------ | ------------------------ |
| `$aspect-ratios` | A list of aspect ratios to generate | `List` | `$carbon--aspect-ratios` |
| Name | Description | Type | Default value |
| --------- | --------------------------- | -------- | ------------- |
| `$width` | width from an aspect ratio | `Number` | — |
| `$height` | height from an aspect ratio | `Number` | — |

- **Group**: [@carbon/grid](#carbongrid)
- **Requires**:
Expand Down Expand Up @@ -6355,6 +6381,7 @@ $text-01: if(
- [tags [mixin]](#tags-mixin)
- [text-area [mixin]](#text-area-mixin)
- [text-input [mixin]](#text-input-mixin)
- [tile [mixin]](#tile-mixin)
- [tooltip--definition--legacy [mixin]](#tooltip--definition--legacy-mixin)

### ✅text-02 [variable]
Expand Down Expand Up @@ -14474,7 +14501,8 @@ Data table action styles

.#{$prefix}--toolbar-action ~ .#{$prefix}--btn {
margin: 0;
height: $layout-04;
max-width: none;
white-space: nowrap;
}

.#{$prefix}--overflow-menu--data-table {
Expand Down Expand Up @@ -14752,7 +14780,7 @@ Data table action styles
.#{$prefix}--toolbar-search-container-active
.#{$prefix}--search
.#{$prefix}--search-input {
visibility: visible;
visibility: inherit;
}

.#{$prefix}--toolbar-search-container-active
Expand Down Expand Up @@ -14797,12 +14825,14 @@ Data table action styles
.#{$prefix}--table-toolbar--small .#{$prefix}--toolbar-action {
height: rem(32px);
width: rem(32px);
padding: $spacing-03;
padding: $spacing-03 0;
}

.#{$prefix}--table-toolbar--small .#{$prefix}--btn--primary {
padding-top: rem(3px);
padding-top: calc(0.375rem - 3px);
padding-bottom: calc(0.375rem - 3px);
height: rem(32px);
min-height: auto;
}

.#{$prefix}--table-toolbar--small
Expand All @@ -14814,7 +14844,6 @@ Data table action styles
.#{$prefix}--toolbar-action
~ .#{$prefix}--btn {
height: rem(32px);
width: rem(160px);
overflow: hidden;
}
}
Expand Down Expand Up @@ -15764,7 +15793,7 @@ Data table expandable styles
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
visibility: visible;
visibility: inherit;
white-space: nowrap;
}
```
Expand Down Expand Up @@ -18556,7 +18585,7 @@ Modal styles
visibility 0ms linear $duration--moderate-02;

&.is-visible {
visibility: visible;
visibility: inherit;
opacity: 1;
background-color: $overlay-01;
transition: background-color $duration--slow-02 motion(entrance, expressive),
Expand Down Expand Up @@ -20583,7 +20612,7 @@ Progress indicator styles
//OVERFLOW STYLING
.#{$prefix}--progress-label-overflow:hover ~ .#{$prefix}--tooltip,
.#{$prefix}--progress-label-overflow:focus ~ .#{$prefix}--tooltip {
visibility: visible;
visibility: inherit;
}

.#{$prefix}--progress-step .#{$prefix}--tooltip .#{$prefix}--tooltip__caret {
Expand Down Expand Up @@ -21127,7 +21156,7 @@ Search styles
outline $duration--fast-02 motion(standard, productive), border
$duration--fast-02 motion(standard, productive);
cursor: pointer;
visibility: visible;
visibility: inherit;
opacity: 1;
height: rem(40px);
width: rem(40px);
Expand Down Expand Up @@ -22387,8 +22416,6 @@ Tag styles
// tags used for filtering
.#{$prefix}--tag--filter {
@include tag-theme($inverse-02, $inverse-01);

cursor: pointer;
padding-right: rem(2px);

&:focus,
Expand All @@ -22397,28 +22424,34 @@ Tag styles
}
}

.#{$prefix}--tag--filter > svg {
.#{$prefix}--tag__close-icon {
flex-shrink: 0;
width: rem(20px);
height: rem(20px);
margin: 0 0 0 rem(4px);
padding: rem(2px);
border: 0;
fill: $inverse-01;
background-color: transparent;
border-radius: 50%;
cursor: pointer;

&:hover {
background-color: $inverse-hover-ui;
}
}

.#{$prefix}--tag--filter:focus > svg {
.#{$prefix}--tag__close-icon svg {
fill: $inverse-01;
}

.#{$prefix}--tag__close-icon:focus {
outline: none;
box-shadow: inset 0 0 0 2px $inverse-focus-ui;
border-radius: 50%;
}

.#{$prefix}--tag--filter.#{$prefix}--tag--disabled svg:hover {
.#{$prefix}--tag--filter.#{$prefix}--tag--disabled
.#{$prefix}--tag__close-icon:hover {
background-color: transparent;
}

Expand Down Expand Up @@ -22812,6 +22845,13 @@ Tile styles
}
}

.#{$prefix}--tile--clickable {
@include reset;
@include type-style('body-short-01');
color: $text-01;
text-decoration: none;
}

.#{$prefix}--tile--selectable {
padding-right: $carbon--spacing-09;
}
Expand Down Expand Up @@ -22887,7 +22927,7 @@ Tile styles
}

.#{$prefix}--tile-content__below-the-fold {
visibility: visible;
visibility: inherit;
opacity: 1;
transition: opacity $duration--fast-02 motion(standard, productive), visibility
$duration--fast-02 motion(standard, productive);
Expand Down Expand Up @@ -22930,6 +22970,7 @@ Tile styles
- [carbon--spacing-05 [variable]](#carbon--spacing-05-variable)
- [ui-02 [variable]](#ui-02-variable)
- [hover-ui [variable]](#hover-ui-variable)
- [text-01 [variable]](#text-01-variable)
- [carbon--spacing-09 [variable]](#carbon--spacing-09-variable)
- [icon-02 [variable]](#icon-02-variable)
- [ui-05 [variable]](#ui-05-variable)
Expand Down Expand Up @@ -24710,7 +24751,7 @@ UI shell header
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
visibility: visible;
visibility: inherit;
white-space: nowrap;
}

Expand Down Expand Up @@ -25220,7 +25261,7 @@ properties for opacity and visibility to help with the transition animation.
.#{$prefix}--side-nav--fixed &,
.#{$prefix}--side-nav--expanded & {
@if $visibility == true {
visibility: visible;
visibility: inherit;
}
@if $opacity == true {
opacity: 1;
Expand Down Expand Up @@ -25299,7 +25340,7 @@ UI shell side nav
width: 0;
}

.#{$prefix}--side-nav:not(.#{$prefix}--side-nav--fixed):hover,
.#{$prefix}--side-nav.bx--side-nav--rail:not(.#{$prefix}--side-nav--fixed):hover,
.#{$prefix}--side-nav--expanded {
width: mini-units(32);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@mixin content-visible {
height: 100%;
visibility: visible;
visibility: inherit;
opacity: 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@

.#{$prefix}--toolbar-action ~ .#{$prefix}--btn {
margin: 0;
height: $layout-04;
max-width: none;
white-space: nowrap;
}

.#{$prefix}--overflow-menu--data-table {
Expand Down Expand Up @@ -538,7 +539,7 @@
.#{$prefix}--toolbar-search-container-active
.#{$prefix}--search
.#{$prefix}--search-input {
visibility: visible;
visibility: inherit;
}

.#{$prefix}--toolbar-search-container-active
Expand Down Expand Up @@ -583,12 +584,14 @@
.#{$prefix}--table-toolbar--small .#{$prefix}--toolbar-action {
height: rem(32px);
width: rem(32px);
padding: $spacing-03;
padding: $spacing-03 0;
}

.#{$prefix}--table-toolbar--small .#{$prefix}--btn--primary {
padding-top: rem(3px);
padding-top: calc(0.375rem - 3px);
padding-bottom: calc(0.375rem - 3px);
height: rem(32px);
min-height: auto;
}

.#{$prefix}--table-toolbar--small
Expand All @@ -600,7 +603,6 @@
.#{$prefix}--toolbar-action
~ .#{$prefix}--btn {
height: rem(32px);
width: rem(160px);
overflow: hidden;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
visibility: visible;
visibility: inherit;
white-space: nowrap;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
.flatpickr-calendar.open,
.flatpickr-calendar.inline {
opacity: 1;
visibility: visible;
visibility: inherit;
overflow: visible;
max-height: 640px;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
visibility 0ms linear $duration--moderate-02;

&.is-visible {
visibility: visible;
visibility: inherit;
opacity: 1;
background-color: $overlay-01;
transition: background-color $duration--slow-02
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
//OVERFLOW STYLING
.#{$prefix}--progress-label-overflow:hover ~ .#{$prefix}--tooltip,
.#{$prefix}--progress-label-overflow:focus ~ .#{$prefix}--tooltip {
visibility: visible;
visibility: inherit;
}

.#{$prefix}--progress-step .#{$prefix}--tooltip .#{$prefix}--tooltip__caret {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/search/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
outline $duration--fast-02 motion(standard, productive),
border $duration--fast-02 motion(standard, productive);
cursor: pointer;
visibility: visible;
visibility: inherit;
opacity: 1;
height: rem(40px);
width: rem(40px);
Expand Down
Loading

0 comments on commit 7b3f0c8

Please sign in to comment.