Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
design-system-lib
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
julkiset-sivut
design-system-lib
Commits
c8f0f8c0
Commit
c8f0f8c0
authored
4 years ago
by
shamalainen
Browse files
Options
Downloads
Patches
Plain Diff
Update accordion style
parent
412dafd1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/accordion-item/accordion-item.scss
+39
-30
39 additions, 30 deletions
src/components/accordion-item/accordion-item.scss
src/components/accordion-item/accordion-item.tsx
+1
-1
1 addition, 1 deletion
src/components/accordion-item/accordion-item.tsx
with
40 additions
and
31 deletions
src/components/accordion-item/accordion-item.scss
+
39
−
30
View file @
c8f0f8c0
...
...
@@ -3,14 +3,10 @@
}
.hy-accordion__item
{
margin-bottom
:
1
rem
;
margin-bottom
:
1
2px
;
&
__is-open
{
border-bottom
:
2px
solid
var
(
--
grayscale-medium
);
border-left
:
1px
solid
var
(
--
grayscale-medium
);
border-right
:
1px
solid
var
(
--
grayscale-medium
);
border-top
:
2px
solid
var
(
--
grayscale-medium
);
box-shadow
:
0
2px
12px
1px
rgba
(
#000000
,
10%
);
border
:
1px
solid
var
(
--
grayscale-dark
);
.hy-accordion--heading
{
margin
:
0
auto
;
...
...
@@ -72,6 +68,7 @@
.hy-accordion__button
{
@include
font-size
(
18px
,
22px
);
@include
font-weight
(
$bold
);
align-items
:
flex-start
;
background-color
:
var
(
--
grayscale-background-box
);
border
:
none
;
...
...
@@ -79,11 +76,10 @@
display
:
flex
;
flex-direction
:
row
;
font-family
:
var
(
--
main-font-family
);
font-weight
:
bold
;
height
:
100%
;
justify-content
:
flex-start
;
letter-spacing
:
-0
.45px
;
padding
:
1
.125rem
1rem
1
.125rem
1rem
;
padding
:
1
3px
20px
13px
16px
;
transition
:
all
0
.35s
ease-in
;
width
:
100%
;
...
...
@@ -105,6 +101,13 @@
@include
font-size
(
20px
,
24px
);
letter-spacing
:
-0
.5px
;
}
.hy-accordion--heading__icon
svg
{
@include
breakpoint
(
$extrawide
)
{
height
:
20px
;
width
:
20px
;
}
}
}
&
[
aria-expanded
=
'true'
]
{
...
...
@@ -120,33 +123,35 @@
position
:
relative
;
&
:after
{
background
:
linear-gradient
(
to
right
,
var
(
--
grayscale-medium
)
,
var
(
--
grayscale-white
)
);
background
-color
:
var
(
--
grayscale-medium-dark
);
bottom
:
0
;
content
:
''
;
height
:
2
px
;
left
:
0
;
height
:
1
px
;
left
:
16px
;
position
:
absolute
;
width
:
100%
;
right
:
20px
;
}
}
}
.hy-accordion--heading__icon
{
margin-right
:
0
.5rem
;
margin-top
:
4px
;
align-items
:
center
;
display
:
inline-flex
;
height
:
22px
;
// Same as text line-height.
margin-right
:
8px
;
z-index
:
0
;
@include
breakpoint
(
$narrow
)
{
margin-right
:
1rem
;
margin-top
:
6px
;
}
svg
{
fill
:
var
(
--
brand-main
);
@include
breakpoint
(
$narrow
)
{
height
:
24px
;
width
:
24px
;
height
:
18px
;
width
:
18px
;
}
@include
breakpoint
(
$xlarge
)
{
height
:
20px
;
width
:
20px
;
}
}
}
...
...
@@ -169,11 +174,12 @@
&
[
aria-expanded
=
'true'
]
{
color
:
var
(
--
grayscale-black
);
margin-bottom
:
20px
;
@include
breakpoint
(
$narrow
)
{
margin-bottom
:
28px
;
}
@include
breakpoint
(
$wide
)
{
margin-bottom
:
32px
;
}
...
...
@@ -210,22 +216,25 @@
&
--inner-wrapper
{
display
:
block
;
padding
:
20px
16px
0
;
padding
:
16px
12px
;
@include
breakpoint
(
$narrow
)
{
padding
:
20px
24px
0
;
padding
:
15px
16px
;
}
@include
breakpoint
(
$wide
)
{
padding
:
16px
;
}
@include
breakpoint
(
$extrawide
)
{
// there is a sidebar
&
--common
{
padding
:
20px
24px
0
;
}
// without sidebar
&
--large
{
padding
:
24px
32px
0
;
padding
:
24px
20px
;
}
}
@include
breakpoint
(
$xlarge
)
{
padding
:
24px
32px
0
;
padding
:
24px
20px
;
}
&
--mini
{
...
...
This diff is collapsed.
Click to expand it.
src/components/accordion-item/accordion-item.tsx
+
1
−
1
View file @
c8f0f8c0
...
...
@@ -226,7 +226,7 @@ export class AccordionItem {
id
=
{
`
${
titleAsId
}
--title`
}
>
<
span
class
=
"hy-accordion--heading__icon"
>
<
hy
-
icon
icon
=
{
'
hy-icon-caret-down
'
}
size
=
{
20
}
/>
<
hy
-
icon
icon
=
{
'
hy-icon-caret-down
'
}
size
=
{
16
}
/>
</
span
>
<
span
>
{
this
.
accordiontitle
}
</
span
>
</
button
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment