Skip to content

Commit

Permalink
Collapse: fix nested collapse-item style (#9566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder authored Jan 30, 2018
1 parent 9b93842 commit ba34e6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
12 changes: 9 additions & 3 deletions packages/collapse/src/collapse-item.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="el-collapse-item" :class="{'is-active': isActive}">
<div class="el-collapse-item">
<div
role="tab"
:aria-expanded="isActive"
Expand All @@ -13,11 +13,17 @@
:id="`el-collapse-head-${id}`"
tabindex="0"
@keyup.space.enter.stop="handleEnterClick"
:class="{'focusing': focusing}"
:class="{
'focusing': focusing,
'is-active': isActive
}"
@focus="handleFocus"
@blur="focusing = false"
>
<i class="el-collapse-item__arrow el-icon-arrow-right"></i>
<i
class="el-collapse-item__arrow el-icon-arrow-right"
:class="{'is-active': isActive}">
</i>
<slot name="title">{{title}}</slot>
</div>
</div>
Expand Down
15 changes: 6 additions & 9 deletions packages/theme-chalk/src/collapse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@
float: right;
line-height: 48px;
font-weight: 300;
@include when(active) {
transform: rotate(90deg);
}
}
&.focusing:focus:not(:hover){
color: $--color-primary;
}
@include when(active) {
border-bottom-color: transparent;
}
}

@include e(wrap) {
Expand All @@ -44,15 +50,6 @@
line-height: 1.769230769230769;
}

@include when(active) {
.el-collapse-item__header {
border-bottom-color: transparent;
.el-collapse-item__arrow {
transform: rotate(90deg);
}
}
}

&:last-child {
margin-bottom: -1px;
}
Expand Down

0 comments on commit ba34e6e

Please sign in to comment.