🎨 styles: hover effect in header

:%s
This commit is contained in:
lytrankieio123 2021-09-08 14:56:11 +07:00
parent db4314090c
commit 700fe602be
6 changed files with 26 additions and 20 deletions

View File

@ -42,7 +42,7 @@
@apply hidden; @apply hidden;
@screen md { @screen md {
@apply flex items-center list-none; @apply flex items-center list-none;
li { > li {
@apply flex justify-center items-center w-full; @apply flex justify-center items-center w-full;
&:not(:last-child) { &:not(:last-child) {
margin-right: 4.8rem; margin-right: 4.8rem;
@ -53,7 +53,7 @@
a { a {
@appy no-underline; @appy no-underline;
&:hover { &:hover {
opacity: .8; opacity: 0.8;
} }
&.iconFavourite { &.iconFavourite {
svg path { svg path {
@ -61,7 +61,14 @@
} }
} }
} }
.btnCart {
&:hover {
svg path {
fill: var(--primary);
opacity: 0.8;
}
}
}
} }
} }
} }

View File

@ -68,7 +68,7 @@ const HeaderMenu = memo(({ isFull, openModalAuthen, openModalInfo }: Props) => {
<MenuDropdown options={optionMenu} isHasArrow={false}><IconUser /></MenuDropdown> <MenuDropdown options={optionMenu} isHasArrow={false}><IconUser /></MenuDropdown>
</li> </li>
<li> <li>
<button> <button className={s.btnCart}>
<IconBuy /> <IconBuy />
</button> </button>
</li> </li>

View File

@ -3,9 +3,6 @@
.menuDropdown { .menuDropdown {
@apply relative cursor-pointer; @apply relative cursor-pointer;
width: fit-content; width: fit-content;
.label {
all: unset;
}
&:hover { &:hover {
.label { .label {
color: var(--primary); color: var(--primary);
@ -20,10 +17,21 @@
} }
.label { .label {
all: unset;
@apply flex justify-end items-center transition-all duration-200; @apply flex justify-end items-center transition-all duration-200;
svg path { svg path {
width: fit-content; width: fit-content;
} }
&:focus,
&:active {
color: var(--primary);
svg path {
fill: currentColor;
}
}
&:focus-visible {
outline: 2px solid #000;
}
} }
&.arrow { &.arrow {
@ -66,18 +74,9 @@
@apply rounded list-none bg-white; @apply rounded list-none bg-white;
border: 1px solid var(--text-active); border: 1px solid var(--text-active);
margin-top: 0.4rem; margin-top: 0.4rem;
li { > li {
@apply block w-full transition-all duration-200 cursor-pointer text-active; @apply block w-full transition-all duration-200 cursor-pointer text-active;
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
overflow-x: hidden;
position: relative;
max-width: 15rem;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis;
button { button {
all: unset; all: unset;
color: currentColor; color: currentColor;

View File

@ -1,7 +1,6 @@
import Link from 'next/link' import Link from 'next/link'
import React, { useEffect, useRef } from 'react' import React, { useEffect, useRef } from 'react'
import { ButtonCommon, Inputcommon } from 'src/components/common' import { ButtonCommon, Inputcommon, InputPassword } from 'src/components/common'
import InputPassword from 'src/components/common/InputPassword/InputPassword'
import { ROUTE } from 'src/utils/constanst.utils' import { ROUTE } from 'src/utils/constanst.utils'
import { CustomInputCommon } from 'src/utils/type.utils' import { CustomInputCommon } from 'src/utils/type.utils'
import s from '../FormAuthen.module.scss' import s from '../FormAuthen.module.scss'

View File

@ -1,5 +1,5 @@
import React, { useEffect, useRef } from 'react' import React, { useEffect, useRef } from 'react'
import { ButtonCommon, Inputcommon } from 'src/components/common' import { ButtonCommon, Inputcommon, InputPassword } from 'src/components/common'
import s from '../FormAuthen.module.scss' import s from '../FormAuthen.module.scss'
import styles from './FormRegister.module.scss' import styles from './FormRegister.module.scss'
import SocialAuthen from '../SocialAuthen/SocialAuthen' import SocialAuthen from '../SocialAuthen/SocialAuthen'

View File

@ -149,6 +149,7 @@
.line { .line {
@apply flex justify-between items-center; @apply flex justify-between items-center;
> div { > div {
flex: 1;
&:not(:last-child) { &:not(:last-child) {
margin-right: 1.6rem; margin-right: 1.6rem;
} }