diff --git a/change/@microsoft-fast-components-86b3473d-11b0-4783-ab8c-6e102807d0c9.json b/change/@microsoft-fast-components-86b3473d-11b0-4783-ab8c-6e102807d0c9.json new file mode 100644 index 00000000000..a5ae59e001c --- /dev/null +++ b/change/@microsoft-fast-components-86b3473d-11b0-4783-ab8c-6e102807d0c9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "flex items should be aligned on cross axis.", + "packageName": "@microsoft/fast-components", + "email": "srdsecond@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/web-components/fast-components/src/button/fixtures/button.html b/packages/web-components/fast-components/src/button/fixtures/button.html index 926e8f539c1..751cb19cc59 100644 --- a/packages/web-components/fast-components/src/button/fixtures/button.html +++ b/packages/web-components/fast-components/src/button/fixtures/button.html @@ -78,3 +78,24 @@

With aria-label

Reset + +

One default, one with start slot, and one with end slot

+
+ Default + + SVG in Start + + + + + + SVG in End + + + + +
diff --git a/packages/web-components/fast-components/src/number-field/fixtures/number-field.html b/packages/web-components/fast-components/src/number-field/fixtures/number-field.html index b84323dfb8c..b72122932b4 100644 --- a/packages/web-components/fast-components/src/number-field/fixtures/number-field.html +++ b/packages/web-components/fast-components/src/number-field/fixtures/number-field.html @@ -128,3 +128,20 @@

In a form

> + +

One default, one with start slot, and one with end slot

+ + + + + + + + + + + diff --git a/packages/web-components/fast-components/src/number-field/number-field.styles.ts b/packages/web-components/fast-components/src/number-field/number-field.styles.ts index 45d0474c909..4d91c693858 100644 --- a/packages/web-components/fast-components/src/number-field/number-field.styles.ts +++ b/packages/web-components/fast-components/src/number-field/number-field.styles.ts @@ -55,6 +55,7 @@ export const numberFieldStyles: FoundationElementTemplate< border-radius: calc(${controlCornerRadius} * 1px); border: calc(${strokeWidth} * 1px) solid ${accentFillRest}; height: calc(${heightNumber} * 1px); + align-items: baseline; } .control { @@ -98,6 +99,13 @@ export const numberFieldStyles: FoundationElementTemplate< visibility: hidden; } + .start, + .control, + .controls, + .end { + align-self: center; + } + .start, .end { margin: auto; diff --git a/packages/web-components/fast-components/src/search/fixtures/search.html b/packages/web-components/fast-components/src/search/fixtures/search.html index d1d9784d013..bd8b76f8eff 100644 --- a/packages/web-components/fast-components/src/search/fixtures/search.html +++ b/packages/web-components/fast-components/src/search/fixtures/search.html @@ -113,3 +113,20 @@

In a form

+ +

One default, one with start slot, and one with end slot

+ + + + + + + + + + + diff --git a/packages/web-components/fast-components/src/search/search.styles.ts b/packages/web-components/fast-components/src/search/search.styles.ts index 8252575d9cd..566ef44051e 100644 --- a/packages/web-components/fast-components/src/search/search.styles.ts +++ b/packages/web-components/fast-components/src/search/search.styles.ts @@ -50,6 +50,7 @@ export const searchStyles: FoundationElementTemplateIn a form > + +

One default, one with start slot, and one with end slot

+ + + + + + + + + + + diff --git a/packages/web-components/fast-components/src/text-field/text-field.styles.ts b/packages/web-components/fast-components/src/text-field/text-field.styles.ts index 2db812eb9ea..cccda141495 100644 --- a/packages/web-components/fast-components/src/text-field/text-field.styles.ts +++ b/packages/web-components/fast-components/src/text-field/text-field.styles.ts @@ -55,6 +55,7 @@ export const textFieldStyles: FoundationElementTemplate< border-radius: calc(${controlCornerRadius} * 1px); border: calc(${strokeWidth} * 1px) solid ${accentFillRest}; height: calc(${heightNumber} * 1px); + align-items: baseline; } .control { @@ -94,6 +95,12 @@ export const textFieldStyles: FoundationElementTemplate< visibility: hidden; } + .start, + .control, + .end { + align-self: center; + } + .start, .end { display: flex;