diff --git a/packages/css/src/components/form-label/form-label.scss b/packages/css/src/components/form-label/form-label.scss deleted file mode 100644 index b6a6bab147..0000000000 --- a/packages/css/src/components/form-label/form-label.scss +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @license EUPL-1.2+ - * Copyright Gemeente Amsterdam - */ - -@import "../../common/hyphenation"; -@import "../../common/text-rendering"; - -.ams-form-label { - color: var(--ams-form-label-color); - font-family: var(--ams-form-label-font-family); - font-size: var(--ams-form-label-font-size); - font-weight: var(--ams-form-label-font-weight); - line-height: var(--ams-form-label-line-height); - - @include hyphenation; - @include text-rendering; -} diff --git a/packages/css/src/components/index.scss b/packages/css/src/components/index.scss index 0fdcbee9dc..0ca1ff3e8e 100644 --- a/packages/css/src/components/index.scss +++ b/packages/css/src/components/index.scss @@ -41,7 +41,7 @@ @import "./button/button"; @import "./card/card"; @import "./checkbox/checkbox"; -@import "./form-label/form-label"; +@import "./label/label"; @import "./grid/grid"; @import "./heading/heading"; @import "./spotlight/spotlight"; diff --git a/packages/css/src/components/form-label/README.md b/packages/css/src/components/label/README.md similarity index 92% rename from packages/css/src/components/form-label/README.md rename to packages/css/src/components/label/README.md index 623bea5655..7851a28de1 100644 --- a/packages/css/src/components/form-label/README.md +++ b/packages/css/src/components/label/README.md @@ -1,6 +1,6 @@ -# Form Label +# Label Describes a form control. diff --git a/packages/css/src/components/label/label.scss b/packages/css/src/components/label/label.scss new file mode 100644 index 0000000000..53ab1f55a4 --- /dev/null +++ b/packages/css/src/components/label/label.scss @@ -0,0 +1,18 @@ +/** + * @license EUPL-1.2+ + * Copyright Gemeente Amsterdam + */ + +@import "../../common/hyphenation"; +@import "../../common/text-rendering"; + +.ams-label { + color: var(--ams-label-color); + font-family: var(--ams-label-font-family); + font-size: var(--ams-label-font-size); + font-weight: var(--ams-label-font-weight); + line-height: var(--ams-label-line-height); + + @include hyphenation; + @include text-rendering; +} diff --git a/packages/css/src/components/search-field/search-field.scss b/packages/css/src/components/search-field/search-field.scss index 9b5d11d4a4..56cdf5069e 100644 --- a/packages/css/src/components/search-field/search-field.scss +++ b/packages/css/src/components/search-field/search-field.scss @@ -11,7 +11,11 @@ } @mixin reset-input { + // Reset native appearance, this causes issues on iOS and Android devices + -webkit-appearance: none; + appearance: none; border: 0; + border-radius: 0; // Reset rounded borders on iOS devices box-sizing: border-box; margin-block: 0; } @@ -57,6 +61,10 @@ @mixin reset-button { border: 0; + + // Reset margins added by Safari on iOS + margin-block: 0; + margin-inline: 0; } .ams-search-field__button { diff --git a/packages/react/src/FormLabel/README.md b/packages/react/src/FormLabel/README.md deleted file mode 100644 index 135d0779b4..0000000000 --- a/packages/react/src/FormLabel/README.md +++ /dev/null @@ -1,5 +0,0 @@ - - -# React Form Label Component - -[Form label documentation](../../../css/src/components/form-label/README.md) diff --git a/packages/react/src/FormLabel/index.ts b/packages/react/src/FormLabel/index.ts deleted file mode 100644 index 5d86e6f51a..0000000000 --- a/packages/react/src/FormLabel/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { FormLabel } from './FormLabel' diff --git a/packages/react/src/FormLabel/FormLabel.test.tsx b/packages/react/src/Label/Label.test.tsx similarity index 69% rename from packages/react/src/FormLabel/FormLabel.test.tsx rename to packages/react/src/Label/Label.test.tsx index 3b6fa3a86e..eea47d3611 100644 --- a/packages/react/src/FormLabel/FormLabel.test.tsx +++ b/packages/react/src/Label/Label.test.tsx @@ -1,11 +1,11 @@ import { render, screen } from '@testing-library/react' import { createRef } from 'react' -import { FormLabel } from './FormLabel' +import { Label } from './Label' import '@testing-library/jest-dom' -describe('Form label', () => { +describe('Label', () => { it('renders an HTML label element', () => { - const { container } = render() + const { container } = render(