Skip to content

Commit 01028c5

Browse files
committed
fix(text-input-skeleton): fix body visibility
1 parent 6c5d4d0 commit 01028c5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/web-components/src/components/text-input/text-input-skeleton.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright IBM Corp. 2019, 2024
2+
* Copyright IBM Corp. 2019, 2025
33
*
44
* This source code is licensed under the Apache-2.0 license found in the
55
* LICENSE file in the root directory of this source tree.
@@ -27,8 +27,9 @@ class CDSTextInputSkeleton extends LitElement {
2727
render() {
2828
const { hideLabel } = this;
2929
return html`
30-
${!hideLabel &&
31-
html` <span class="${prefix}--label ${prefix}--skeleton"></span> `}
30+
${hideLabel
31+
? ''
32+
: html`<span class="${prefix}--label ${prefix}--skeleton"></span>`}
3233
<div class="${prefix}--text-input ${prefix}--skeleton"></div>
3334
`;
3435
}

packages/web-components/src/components/text-input/text-input.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright IBM Corp. 2019, 2024
2+
// Copyright IBM Corp. 2019, 2025
33
//
44
// This source code is licensed under the Apache-2.0 license found in the
55
// LICENSE file in the root directory of this source tree.
@@ -15,13 +15,16 @@ $css--plex: true !default;
1515
@use '@carbon/styles/scss/layout' as *;
1616
@use '@carbon/styles/scss/utilities/ai-gradient' as *;
1717

18-
:host(#{$prefix}-text-input) {
18+
:host(#{$prefix}-text-input),
19+
:host(#{$prefix}-text-input-skeleton) {
1920
@include emit-layout-tokens();
2021

2122
// the base text-input class has a 100% so we need to propagate it up to the host element
2223
inline-size: 100%;
2324
outline: none;
25+
}
2426

27+
:host(#{$prefix}-text-input) {
2528
::slotted(#{$prefix}-ai-label),
2629
::slotted(#{$prefix}-slug) {
2730
position: absolute;

0 commit comments

Comments
 (0)