Skip to content

Commit

Permalink
fix(ld-input): add box-sizing border-box to textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdiakur committed Nov 16, 2021
1 parent 7103507 commit dc689e4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
26 changes: 26 additions & 0 deletions screenshot/builds/master.json
Original file line number Diff line number Diff line change
Expand Up @@ -4684,6 +4684,32 @@
"isLandscape": false,
"isMobile": false
},
{
"id": "ab9cae96",
"image": "6b11baeb77f4acbd9c2231aafa449edc.png",
"userAgent": "default",
"desc": "ld-input multiline css component",
"testPath": "./src/liquid/components/ld-input/test/ld-input.e2e.ts",
"width": 600,
"height": 600,
"deviceScaleFactor": 1,
"hasTouch": false,
"isLandscape": false,
"isMobile": false
},
{
"id": "fdd9fe79",
"image": "6b11baeb77f4acbd9c2231aafa449edc.png",
"userAgent": "default",
"desc": "ld-input multiline web component",
"testPath": "./src/liquid/components/ld-input/test/ld-input.e2e.ts",
"width": 600,
"height": 600,
"deviceScaleFactor": 1,
"hasTouch": false,
"isLandscape": false,
"isMobile": false
},
{
"id": "db9080ce",
"image": "f063bbae55a3e0af086a49487af3d576.png",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/liquid/components/ld-input/ld-input.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

> input {
align-self: stretch;
box-sizing: border-box;
max-height: var(--ld-input-max-height-md);

&[type='file'] {
Expand Down Expand Up @@ -152,6 +151,7 @@
border-radius: var(--ld-br-m);
outline: none;
appearance: none;
box-sizing: border-box;

&::placeholder {
color: var(--ld-input-placeholder-col);
Expand Down
21 changes: 21 additions & 0 deletions src/liquid/components/ld-input/test/ld-input.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,27 @@ describe('ld-input', () => {
})
}

describe('multiline', () => {
it('web component', async () => {
const page = await getPageWithContent(
`<ld-input placeholder="Placeholder" multiline rows="5" cols="33"></ld-input>`
)
const results = await page.compareScreenshot()
expect(results).toMatchScreenshot()
})

it('css component', async () => {
const page = await getPageWithContent(
`<div class="ld-input">
<textarea placeholder="Placeholder" rows="5" cols="33"></textarea>
</div>`,
{ components: LdInput }
)
const results = await page.compareScreenshot()
expect(results).toMatchScreenshot()
})
})

describe('aria-disabled', () => {
it('prevents input value changes with an aria-disabled attribute', async () => {
const page = await getPageWithContent(
Expand Down

0 comments on commit dc689e4

Please sign in to comment.