Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: grey placeholders in form components #128

Merged
merged 8 commits into from
Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/events-helsinki/src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ button {
}

::placeholder {
color: var(--color-primary-black);
color: var(--color-black-60);
}

:-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: var(--color-primary-black);
color: var(--color-black-60);
}

::-ms-input-placeholder {
/* Microsoft Edge */
color: var(--color-primary-black);
color: var(--color-black-60);
}

#cookie-consent-language-selector-button {
Expand Down
14 changes: 14 additions & 0 deletions apps/hobbies-helsinki/src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ button {
cursor: pointer;
}

::placeholder {
color: var(--color-black-60);
}

:-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: var(--color-black-60);
}

::-ms-input-placeholder {
/* Microsoft Edge */
color: var(--color-black-60);
}

#cookie-consent-language-selector-button {
display: none;
}
14 changes: 14 additions & 0 deletions apps/sports-helsinki/src/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ button {
cursor: pointer;
}

::placeholder {
color: var(--color-black-60);
}

:-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: var(--color-black-60);
}

::-ms-input-placeholder {
/* Microsoft Edge */
color: var(--color-black-60);
}

#cookie-consent-language-selector-button {
display: none;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import classNames from 'classnames';
import { IconAngleDown, IconAngleUp, IconCalendarClock } from 'hds-react';
import React from 'react';
import type { FunctionComponent } from 'react';
Expand Down Expand Up @@ -167,7 +168,12 @@ const DateSelector: FunctionComponent<DateSelectorProps> = ({
<IconCalendarClock aria-hidden />
</div>
<div className={styles.info}>
<div className={styles.buttonTextWrapper}>
<div
className={classNames(
styles.buttonTextWrapper,
!selectedText && styles.isEmpty
)}
>
{selectedText || (t('common:dateSelector.title') as string)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
height: 1.25rem;
width: 1.25rem;
fill: var(--color-primary-black);
& > g {
color: var(--color-primary-black);
}
}
}

Expand All @@ -47,6 +50,11 @@
line-height: 1.25rem;
right: 0;
text-overflow: ellipsis;
color: var(--color-primary-black);

&.isEmpty {
color: var(--color-black-60);
}
}
}

Expand All @@ -59,6 +67,9 @@
pointer-events: none;
height: 1.25rem;
width: 1.25rem;
& > g {
color: var(--color-primary-black);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,14 @@ const MultiSelectDropdown: React.FC<MultiselectDropdownProps> = ({
<SearchLabel htmlFor={name} srOnly={true}>
{title}
</SearchLabel>
<div className={styles.titleText}>{selectedText || title}</div>
<div
className={classNames(
styles.titleText,
!selectedText && styles.isEmpty
)}
>
{selectedText || title}
</div>
</div>
<div className={styles.arrowWrapper}>
{isMenuOpen ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
svg {
margin-right: 1rem;
fill: var(--color-primary-black);
& > g {
color: var(--color-primary-black);
}
}
}

Expand All @@ -69,6 +72,10 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--color-primary-black);
}
.isEmpty {
color: var(--color-black-60);
}
}

Expand All @@ -80,6 +87,9 @@
margin-left: 0.75rem;
pointer-events: none;
color: var(--color-primary-black);
& > g {
color: var(--color-primary-black);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,14 @@ const RangeDropdown: React.FC<RangeDropdownProps> = ({
<SearchLabel htmlFor={name} srOnly={true}>
{title}
</SearchLabel>
<div className={styles.titleText}>{title}</div>
<div
className={classNames(
styles.titleText,
!value.filter(skipFalsyType).length && styles.isEmpty
)}
>
{title}
</div>
</div>
<div className={styles.arrowWrapper}>
{isMenuOpen ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

svg {
margin-right: 1rem;
color: var(--color-primary-black);
fill: var(--color-primary-black);
}
}
Expand All @@ -70,6 +71,10 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--color-primary-black);
}
.isEmpty {
color: var(--color-black-60);
}
}

Expand Down