Commit fba36b83 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner

Refactor styling of VersionInfo and related HelpPanel components

parent 9b5c2031
...@@ -20,7 +20,7 @@ function VersionInfo({ toastMessenger, versionData }) { ...@@ -20,7 +20,7 @@ function VersionInfo({ toastMessenger, versionData }) {
}; };
return ( return (
<div> <div className="u-vertical-rhythm">
<dl className="version-info"> <dl className="version-info">
<dt className="version-info__key">Version</dt> <dt className="version-info__key">Version</dt>
<dd className="version-info__value">{versionData.version}</dd> <dd className="version-info__value">{versionData.version}</dd>
...@@ -35,7 +35,7 @@ function VersionInfo({ toastMessenger, versionData }) { ...@@ -35,7 +35,7 @@ function VersionInfo({ toastMessenger, versionData }) {
<dt className="version-info__key">Date</dt> <dt className="version-info__key">Date</dt>
<dd className="version-info__value">{versionData.timestamp}</dd> <dd className="version-info__value">{versionData.timestamp}</dd>
</dl> </dl>
<div className="version-info__actions"> <div className="u-layout-row--justify-center">
<Button <Button
buttonText="Copy version details" buttonText="Copy version details"
onClick={copyVersionData} onClick={copyVersionData}
......
...@@ -70,12 +70,14 @@ ...@@ -70,12 +70,14 @@
/** /**
* Establish a vertical (margin) rhythm for this element's immediate * Establish a vertical (margin) rhythm for this element's immediate
* children (i.e. put equal space between children). Currently set to 1em. * children (i.e. put equal space between children).
*
* @param $size [var.$layout-margin--medium]: Spacing size (padding)
* @FIXME Find workaround for SvgIcon exception * @FIXME Find workaround for SvgIcon exception
*/ */
@mixin vertical-rhythm { @mixin vertical-rhythm($size: var.$layout-margin) {
& > * + *:not([class*='svg-icon--inline']) { & > * + *:not([class*='svg-icon--inline']) {
margin-top: var.$layout-margin; margin-top: $size;
} }
} }
......
...@@ -81,6 +81,9 @@ img::-moz-selection { ...@@ -81,6 +81,9 @@ img::-moz-selection {
ul, ul,
ol, ol,
dl,
dd,
dt,
li { li {
@include reset.reset-box-model; @include reset.reset-box-model;
} }
......
@use "../../mixins/buttons"; @use "../../mixins/buttons";
@use "../../mixins/layout";
@use "../../mixins/molecules"; @use "../../mixins/molecules";
@use "../../mixins/utils"; @use "../../mixins/utils";
@use "../../variables" as var; @use "../../variables" as var;
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
&__subcontent { &__subcontent {
@include utils.border-top; @include utils.border-top;
@include utils.border-bottom; @include utils.border-bottom;
@include layout.vertical-space;
a { a {
text-decoration: underline; text-decoration: underline;
......
@use "../../variables" as var; @use "../../variables" as var;
@use "../../mixins/layout";
@use "../../mixins/utils"; @use "../../mixins/utils";
.tutorial { .tutorial {
&__list { &__list {
padding-left: 2em; @include layout.vertical-rhythm(var.$layout-margin--small);
}
&__item {
margin: var.$layout-margin--small 0;
} }
&__icon { &__icon {
......
...@@ -2,28 +2,21 @@ ...@@ -2,28 +2,21 @@
@use "../../mixins/layout"; @use "../../mixins/layout";
.version-info { .version-info {
margin-top: var.$layout-margin--small; @include layout.row;
// Allow multiple lines of content
flex-wrap: wrap;
&__key { &__key {
float: left; flex-basis: 25%;
width: 8em;
margin-bottom: var.$layout-margin--small;
padding-right: var.$layout-margin;
line-height: 1.25em;
text-align: right; text-align: right;
font-weight: 500; font-weight: 500;
color: var.$color-text;
} }
&__value { &__value {
margin-bottom: var.$layout-margin--small; margin-left: 1em; // Space between key and value
margin-left: 8em; flex-basis: 70%;
flex-grow: 1;
overflow-wrap: break-word; // Keep really long userids from overflowing overflow-wrap: break-word; // Keep really long userids from overflowing
color: var.$color-text-light; color: var.$color-text-light;
} }
&__actions {
@include layout.row(center);
padding-bottom: var.$layout-margin--small;
}
} }
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
@include layout.row($justify: right); @include layout.row($justify: right);
} }
// Establish a row flex container that centers its children
.u-layout-row--justify-center {
@include layout.row($justify: center);
}
// Use this class to make an element in a flex container "stretchy" and grow // Use this class to make an element in a flex container "stretchy" and grow
// when there is extra space available. // when there is extra space available.
.u-stretch { .u-stretch {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment