mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 03:00:49 +08:00
feat: initialize new React application structure with TypeScript, ESLint, and Prettier configurations, while removing legacy files and adding new components and pages for enhanced functionality
This commit is contained in:
61
src/styles/mixins.scss
Normal file
61
src/styles/mixins.scss
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* SCSS 混入
|
||||
*/
|
||||
|
||||
// 响应式断点
|
||||
@mixin mobile {
|
||||
@media (max-width: #{$breakpoint-mobile}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin tablet {
|
||||
@media (min-width: #{$breakpoint-mobile + 1}) and (max-width: #{$breakpoint-tablet}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin desktop {
|
||||
@media (min-width: #{$breakpoint-tablet + 1}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
// Flexbox 居中
|
||||
@mixin flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
// 文本截断
|
||||
@mixin text-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 多行文本截断
|
||||
@mixin text-ellipsis-multiline($lines: 2) {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: $lines;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 按钮重置
|
||||
@mixin button-reset {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
outline: none;
|
||||
|
||||
&:focus {
|
||||
outline: 2px solid $primary-color;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user