Skip to content

Commit

Permalink
fix(ld-button): spacings and colors
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed May 29, 2021
1 parent fb268b7 commit 7eee836
Show file tree
Hide file tree
Showing 87 changed files with 467 additions and 535 deletions.
888 changes: 444 additions & 444 deletions screenshot/builds/master.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
4 changes: 2 additions & 2 deletions src/docs/components/docs-copy-to-cb/docs-copy-to-cb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export class DocsCopyToCb {
textArea.value = textToCopy
textArea.classList.add('ld-sr-only')
document.body.appendChild(textArea)
textArea.focus()
textArea.focus({ preventScroll: true })
textArea.select()
await document.execCommand('copy')
textArea.remove()
this.el.querySelector('button').focus()
this.el.querySelector('button').focus({ preventScroll: true })
}
}

Expand Down
27 changes: 19 additions & 8 deletions src/liquid/components/ld-button/ld-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@
--ld-icon-size-lg: 1.5rem;
--ld-padding-sm-x: 0.625rem;
--ld-padding-sm-y: 0.5rem;
--ld-padding-md-x: 0.75rem;
--ld-padding-md-x: 0.875rem;
--ld-padding-md-y: 0.625rem;
--ld-padding-lg-x: 1rem;
--ld-padding-lg-x: 1.3125rem;
--ld-padding-lg-y: 0.75rem;
--ld-gap-sm: 0.5625rem;
--ld-gap-md: 0.75rem;
--ld-gap-lg: 0.75rem;
--ld-gap-sm: 0.625rem;
--ld-gap-md: 0.875rem;
--ld-gap-lg: 1.1875rem;
--ld-icon-margin-x-sm: -0.125rem;
--ld-icon-margin-x-md: -0.25rem;
--ld-icon-margin-x-lg: -0.5rem;
font: var(--ld-typo-body-m);
border: 0;
padding: var(--ld-padding-md-y) var(--ld-padding-md-x);
Expand Down Expand Up @@ -59,7 +62,7 @@
}

:where(.ld-icon) {
margin: auto -0.125rem;
margin: auto var(--ld-icon-margin-x-md);
}

&:where(.ld-button--sm) {
Expand All @@ -71,6 +74,10 @@
line-height: 1;
gap: var(--ld-gap-sm);

:where(.ld-icon) {
margin: auto var(--ld-icon-margin-x-sm);
}

.ld-icon,
.ld-icon :where(svg) {
width: var(--ld-icon-size-sm);
Expand All @@ -87,6 +94,10 @@
line-height: 1;
gap: var(--ld-gap-lg);

:where(.ld-icon) {
margin: auto var(--ld-icon-margin-x-lg);
}

.ld-icon,
.ld-icon :where(svg) {
width: var(--ld-icon-size-lg);
Expand Down Expand Up @@ -196,7 +207,7 @@

.ld-button--highlight {
background-color: var(--ld-col-vy-default);
color: var(--ld-col-rblck-default);
color: var(--ld-col-vy6);

&:where(:not(:disabled):not([aria-disabled='true'])) {
&:focus:focus-visible {
Expand All @@ -210,7 +221,7 @@
&:active,
&:active:focus-visible {
background-color: var(--ld-col-vy-active);
color: var(--ld-col-wht);
color: var(--ld-col-vy4);
}
}
}
Expand Down
21 changes: 2 additions & 19 deletions src/liquid/components/ld-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ permalink: liquid/components/ld-button/

# Button

Buttons are used for triggering important user actions. A button text should be speaking in the sense of the user’s understanding, rather than in the system’s language.
Icon-buttons without visual text should contain a screen-reader-only text.
Buttons are used for triggering events on the user interface. A button's text should express what the button does.
Icon-buttons without visual text should contain a screen-reader-only text, have an aria-label, a `title` element within the svg icon or an `alt` text on an `img` element.

---

Expand Down Expand Up @@ -436,23 +436,6 @@ You can align the text inside the button using the `align-text` propperty.
| `target` | `target` | The `target` attributed can be used in conjunction with the `href` attribute. See [mdn docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target) for more information on the `target` attribute. | `"_blank" \| "_parent" \| "_self" \| "_top"` | `undefined` |


## Dependencies

### Used by

- docs-copy-to-cb
- docs-edit-on-github
- docs-toggle-code

### Graph
```mermaid
graph TD;
docs-copy-to-cb --> ld-button
docs-edit-on-github --> ld-button
docs-toggle-code --> ld-button
style ld-button fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
13 changes: 0 additions & 13 deletions src/liquid/components/ld-heading/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,6 @@ Here are some examples on how you can apply different colors on headings:
| `visualLevel` | `visual-level` | The heading style. Overrides the style inferred from the heading level. | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "b1" \| "b2" \| "b3" \| "b4" \| "b5" \| "b6" \| "xb1" \| "xb2" \| "xb3" \| "xh1" \| "xh2" \| "xh3" \| "xh4" \| "xh5" \| "xh6"` | `undefined` |


## Dependencies

### Used by

- docs-nav

### Graph
```mermaid
graph TD;
docs-nav --> ld-heading
style ld-heading fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
17 changes: 0 additions & 17 deletions src/liquid/components/ld-icon/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,6 @@ Liquid's icons use the [`currentColor`](https://developer.mozilla.org/en-US/docs
| | (optional) Custom SVG icon (only valid without name prop). |


## Dependencies

### Used by

- docs-copy-to-cb
- docs-edit-on-github
- docs-toggle-code

### Graph
```mermaid
graph TD;
docs-copy-to-cb --> ld-icon
docs-edit-on-github --> ld-icon
docs-toggle-code --> ld-icon
style ld-icon fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
13 changes: 0 additions & 13 deletions src/liquid/components/ld-input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,19 +342,6 @@ If you'd rather like to use the CSS component, inspect and copy the markup and C
| `"start"` | The purpose of this slot is to add icons or buttons to the input, __justifying the item to the end of the component__. Styling for `ld-icon` and `ld-button` is provided within the `ld-input` component. If you choose to place something different into the slot, you will probably need to adjust some styles on the slotted item in order to make it fit right. |


## Dependencies

### Used by

- docs-search

### Graph
```mermaid
graph TD;
docs-search --> ld-input
style ld-input fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
19 changes: 0 additions & 19 deletions src/liquid/components/ld-sr-only/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ The CSS class `ld-sr-only` works the same way as its web component counterpart,
<!-- Auto Generated Below -->


## Dependencies

### Used by

- docs-copy-to-cb
- docs-pick-theme
- docs-switch-web-css
- docs-toggle-code

### Graph
```mermaid
graph TD;
docs-copy-to-cb --> ld-sr-only
docs-pick-theme --> ld-sr-only
docs-switch-web-css --> ld-sr-only
docs-toggle-code --> ld-sr-only
style ld-sr-only fill:#f9f,stroke:#333,stroke-width:4px
```

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*

0 comments on commit 7eee836

Please sign in to comment.