-
Notifications
You must be signed in to change notification settings - Fork 206
fix: vertical rule doesn't render #476
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
Changes from all commits
869c5b7
b19a9b3
ed00cbe
ea7b85f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,47 +12,54 @@ governing permissions and limitations under the License. | |
|
|
||
| @import '../commons/index.css'; | ||
|
|
||
| :root { | ||
| --spectrum-divider-vertical-height: 100%; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Defining height as a variable fixes #455 |
||
|
|
||
| /* Work around DNA misspelling */ | ||
| --spectrum-divider-small-vertical-width: var(--spectrum-divider-small-vertical-width, var(--spectrum-divider-small-veritcal-width)); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current version of DNA has this token, but it's spelled wrong |
||
| } | ||
|
|
||
| .spectrum-Rule { | ||
| width: 100%; | ||
|
|
||
| /* Show the overflow for hr in Edge and IE. */ | ||
| overflow: visible; | ||
|
|
||
| border: none; | ||
| border-width: var(--spectrum-rule-medium-height); | ||
| border-radius: var(--spectrum-rule-medium-height); | ||
| border-width: var(--spectrum-divider-medium-height); | ||
| border-radius: var(--spectrum-divider-medium-height); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All tokens renamed from |
||
| } | ||
|
|
||
| .spectrum-Rule--large { | ||
| height: var(--spectrum-rule-large-height); | ||
| height: var(--spectrum-divider-large-height); | ||
|
|
||
| border-radius: var(--spectrum-rule-large-border-radius); | ||
| border-radius: var(--spectrum-divider-large-border-radius); | ||
| } | ||
|
|
||
| .spectrum-Rule--medium { | ||
| height: var(--spectrum-rule-medium-height); | ||
| height: var(--spectrum-divider-medium-height); | ||
|
|
||
| border-radius: var(--spectrum-rule-medium-border-radius); | ||
| border-radius: var(--spectrum-divider-medium-border-radius); | ||
| } | ||
|
|
||
| .spectrum-Rule--small { | ||
| height: var(--spectrum-rule-small-height); | ||
| height: var(--spectrum-divider-small-height); | ||
|
|
||
| border-radius: var(--spectrum-rule-small-border-radius); | ||
| border-radius: var(--spectrum-divider-small-border-radius); | ||
| } | ||
|
|
||
| .spectrum-Rule--vertical { | ||
| height: 100%; | ||
| height: var(--spectrum-divider-vertical-height); | ||
|
|
||
| &.spectrum-Rule--large { | ||
| width: var(--spectrum-rule-large-height); | ||
| width: var(--spectrum-divider-large-vertical-width); | ||
| } | ||
|
|
||
| &.spectrum-Rule--medium { | ||
| width: var(--spectrum-rule-medium-height); | ||
| width: var(--spectrum-divider-medium-vertical-width); | ||
| } | ||
|
|
||
| &.spectrum-Rule--small { | ||
| width: var(--spectrum-rule-small-height); | ||
| width: var(--spectrum-divider-small-vertical-width); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,41 +22,36 @@ examples: | |
| <p class="spectrum-Body">Divide like-elements (tables, tool groups, elements within a panel, etc.)</p> | ||
| - id: rule-vertical-small | ||
| name: 'Vertical, Small' | ||
| description: | | ||
| When a vertical Rule is used inside of a flex container, use `align-self: stretch; height: auto` on the Rule. | ||
| ButtonGroup automatically applies these styles to vertical Rules. | ||
| markup: | | ||
| <div style="display: flex; flex-direction: row; height: 32px"> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-Tool"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Properties"> | ||
| <use xlink:href="#spectrum-icon-18-Properties" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-ActionButton spectrum-ActionButton--quiet"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Properties"> | ||
| <use xlink:href="#spectrum-icon-18-Properties" /> | ||
| </svg> | ||
| </button> | ||
| <div class="spectrum-Rule spectrum-Rule--small spectrum-Rule--vertical"></div> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-Tool"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Select"> | ||
| <use xlink:href="#spectrum-icon-18-Select" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| <button class="spectrum-ActionButton spectrum-ActionButton--quiet"> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switched to ActionButton because Tool is deprecated. They are visually identical. |
||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Select"> | ||
| <use xlink:href="#spectrum-icon-18-Select" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| - id: rule-vertical-medium | ||
| name: 'Vertical, Medium' | ||
| markup: | | ||
| <div style="display: flex; flex-direction: row; height: 32px"> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-Tool"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Properties"> | ||
| <use xlink:href="#spectrum-icon-18-Properties" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-ActionButton spectrum-ActionButton--quiet"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Properties"> | ||
| <use xlink:href="#spectrum-icon-18-Properties" /> | ||
| </svg> | ||
| </button> | ||
| <div class="spectrum-Rule spectrum-Rule--medium spectrum-Rule--vertical"></div> | ||
| <div class="spectrum-ButtonGroup"> | ||
| <button class="spectrum-Tool"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Select"> | ||
| <use xlink:href="#spectrum-icon-18-Select" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| <button class="spectrum-ActionButton spectrum-ActionButton--quiet"> | ||
| <svg class="spectrum-Icon spectrum-Icon--sizeS" focusable="false" aria-hidden="true" aria-label="Select"> | ||
| <use xlink:href="#spectrum-icon-18-Select" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@spectrum-css/button": "^2.0.3", | ||
| "@spectrum-css/buttongroup": "^2.0.3", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This dependency was missing before. |
||
| "@spectrum-css/component-builder": "^1.0.2", | ||
| "@spectrum-css/vars": "^1.0.0-alpha.0", | ||
| "gulp": "^4.0.0" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it so Rules inside of ButtonGroups look nice.