2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/mixins/index';
|
2016-12-30 21:41:28 +08:00
|
|
|
|
2018-12-07 16:17:45 +08:00
|
|
|
@layout-prefix-cls: ~'@{ant-prefix}-layout';
|
2021-05-24 16:24:00 +08:00
|
|
|
@layout-menu-prefix-cls: ~'@{ant-prefix}-menu';
|
2016-12-30 21:41:28 +08:00
|
|
|
|
|
|
|
.@{layout-prefix-cls} {
|
|
|
|
display: flex;
|
|
|
|
flex: auto;
|
2019-02-15 10:48:07 +08:00
|
|
|
flex-direction: column;
|
2021-10-22 13:35:36 +08:00
|
|
|
|
2018-09-20 22:48:13 +08:00
|
|
|
/* fix firefox can't set height smaller than content on flex item */
|
|
|
|
min-height: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @layout-body-background;
|
2016-12-30 21:41:28 +08:00
|
|
|
|
2017-09-22 18:33:29 +08:00
|
|
|
&,
|
|
|
|
* {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
2017-01-08 17:03:47 +08:00
|
|
|
&&-has-sider {
|
|
|
|
flex-direction: row;
|
2020-12-09 17:12:32 +08:00
|
|
|
|
2017-08-08 13:38:10 +08:00
|
|
|
> .@{layout-prefix-cls},
|
|
|
|
> .@{layout-prefix-cls}-content {
|
2020-12-05 23:07:17 +08:00
|
|
|
width: 0; // https://segmentfault.com/a/1190000019498300
|
2017-08-08 13:38:10 +08:00
|
|
|
}
|
2017-01-08 17:03:47 +08:00
|
|
|
}
|
|
|
|
|
2016-12-30 21:41:28 +08:00
|
|
|
&-header,
|
|
|
|
&-footer {
|
2017-01-08 17:03:47 +08:00
|
|
|
flex: 0 0 auto;
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
height: @layout-header-height;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding: @layout-header-padding;
|
2020-01-21 11:24:57 +08:00
|
|
|
color: @layout-header-color;
|
2016-12-30 21:41:28 +08:00
|
|
|
line-height: @layout-header-height;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @layout-header-background;
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-footer {
|
|
|
|
padding: @layout-footer-padding;
|
|
|
|
color: @text-color;
|
|
|
|
font-size: @font-size-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @layout-footer-background;
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-content {
|
|
|
|
flex: auto;
|
2021-10-22 13:35:36 +08:00
|
|
|
|
2018-09-20 22:48:13 +08:00
|
|
|
/* fix firefox can't set height smaller than content on flex item */
|
|
|
|
min-height: 0;
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-sider {
|
|
|
|
position: relative;
|
2017-08-04 17:58:32 +08:00
|
|
|
|
|
|
|
/* fix firefox can't set width smaller than content on flex item */
|
2017-04-22 10:38:44 +08:00
|
|
|
min-width: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
background: @layout-sider-background;
|
|
|
|
transition: all 0.2s;
|
2016-12-30 21:41:28 +08:00
|
|
|
|
2017-09-23 18:33:26 +08:00
|
|
|
&-children {
|
|
|
|
height: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-top: -0.1px;
|
2017-10-21 15:12:56 +08:00
|
|
|
// Hack for fixing margin collaspe bug
|
|
|
|
// https://github.com/ant-design/ant-design/issues/7967
|
|
|
|
// solution from https://stackoverflow.com/a/33132624/3040605
|
|
|
|
padding-top: 0.1px;
|
2021-05-24 16:24:00 +08:00
|
|
|
|
|
|
|
.@{layout-menu-prefix-cls}.@{layout-menu-prefix-cls}-inline-collapsed {
|
|
|
|
width: auto;
|
|
|
|
}
|
2017-09-23 18:33:26 +08:00
|
|
|
}
|
|
|
|
|
2016-12-30 21:41:28 +08:00
|
|
|
&-has-trigger {
|
|
|
|
padding-bottom: @layout-trigger-height;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-right {
|
|
|
|
order: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-trigger {
|
2017-08-11 16:00:25 +08:00
|
|
|
position: fixed;
|
2016-12-30 21:41:28 +08:00
|
|
|
bottom: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
z-index: 1;
|
2016-12-30 21:41:28 +08:00
|
|
|
height: @layout-trigger-height;
|
2017-07-22 02:21:31 +08:00
|
|
|
color: @layout-trigger-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @layout-trigger-height;
|
|
|
|
text-align: center;
|
2017-09-27 22:32:49 +08:00
|
|
|
background: @layout-trigger-background;
|
2019-02-15 10:48:07 +08:00
|
|
|
cursor: pointer;
|
2018-12-07 16:17:45 +08:00
|
|
|
transition: all 0.2s;
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
2017-03-05 21:10:34 +08:00
|
|
|
|
|
|
|
&-zero-width {
|
2020-10-13 21:16:20 +08:00
|
|
|
> * {
|
2017-03-05 21:10:34 +08:00
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-trigger {
|
|
|
|
position: absolute;
|
|
|
|
top: @layout-header-height;
|
|
|
|
right: -@layout-zero-trigger-width;
|
2019-06-21 17:45:46 +08:00
|
|
|
z-index: 1;
|
2017-03-05 21:10:34 +08:00
|
|
|
width: @layout-zero-trigger-width;
|
|
|
|
height: @layout-zero-trigger-height;
|
2018-03-29 10:50:58 +08:00
|
|
|
color: @layout-trigger-color;
|
2020-12-25 14:31:44 +08:00
|
|
|
font-size: (@layout-zero-trigger-width / 2);
|
2019-02-15 10:48:07 +08:00
|
|
|
line-height: @layout-zero-trigger-height;
|
|
|
|
text-align: center;
|
|
|
|
background: @layout-sider-background;
|
2017-03-05 21:10:34 +08:00
|
|
|
border-radius: 0 @border-radius-base @border-radius-base 0;
|
|
|
|
cursor: pointer;
|
2018-12-07 16:17:45 +08:00
|
|
|
transition: background 0.3s ease;
|
2017-03-05 21:10:34 +08:00
|
|
|
|
2020-09-18 14:29:42 +08:00
|
|
|
&::after {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
background: transparent;
|
|
|
|
transition: all 0.3s;
|
|
|
|
content: '';
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover::after {
|
|
|
|
background: rgba(255, 255, 255, 0.1);
|
2017-03-05 21:10:34 +08:00
|
|
|
}
|
2019-01-21 12:12:33 +08:00
|
|
|
|
|
|
|
&-right {
|
|
|
|
left: -@layout-zero-trigger-width;
|
2019-08-02 14:05:59 +08:00
|
|
|
border-radius: @border-radius-base 0 0 @border-radius-base;
|
2019-01-21 12:12:33 +08:00
|
|
|
}
|
2017-03-05 21:10:34 +08:00
|
|
|
}
|
|
|
|
}
|
2016-12-30 21:41:28 +08:00
|
|
|
}
|
|
|
|
}
|
2018-05-23 23:46:28 +08:00
|
|
|
|
|
|
|
@import './light';
|
2020-05-07 10:18:51 +08:00
|
|
|
@import './rtl';
|