icon.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. /**Variable**/
  2. @import './helpers/mixin.scss';
  3. [class*="vxe-icon--"] {
  4. display: inline-block;
  5. vertical-align: middle;
  6. position: relative;
  7. direction: ltr;
  8. font-family: $vxe-icon-font-family;
  9. font-weight: normal;
  10. user-select: none;
  11. &.rotate45 {
  12. transform: rotate(45deg);
  13. }
  14. &.rotate90 {
  15. transform: rotate(90deg);
  16. }
  17. &.rotate180 {
  18. transform: rotate(180deg);
  19. }
  20. }
  21. %DefaultWidthHeight {
  22. width: 1em;
  23. height: 1em;
  24. line-height: 1em;
  25. }
  26. %PseudoClass {
  27. content: "";
  28. position: absolute;
  29. }
  30. .vxe-icon--square {
  31. @extend %DefaultWidthHeight;
  32. &:before {
  33. @extend %PseudoClass;
  34. left: 0.05em;
  35. top: 0.05em;
  36. width: 0.9em;
  37. height: 0.9em;
  38. border-width: 0.1em;
  39. border-style: solid;
  40. border-color: inherit;
  41. }
  42. }
  43. .vxe-icon--zoomin {
  44. @extend %DefaultWidthHeight;
  45. border-width: 0.1em;
  46. border-style: solid;
  47. border-color: inherit;
  48. background-color: $vxe-icon-background-color;
  49. &:before,
  50. &:after {
  51. @extend %PseudoClass;
  52. background-color: inherit;
  53. }
  54. &:before {
  55. left: -0.1em;
  56. top: 0.2em;
  57. width: 1.1em;
  58. height: 0.4em;
  59. }
  60. &:after {
  61. top: -0.1em;
  62. left: 0.2em;
  63. width: 0.4em;
  64. height: 1.1em;
  65. }
  66. }
  67. .vxe-icon--zoomout {
  68. @extend %DefaultWidthHeight;
  69. position: relative;
  70. &:before {
  71. @extend %PseudoClass;
  72. right: 0;
  73. top: 0;
  74. width: 0.7em;
  75. height: 0.7em;
  76. border-width: 0.1em;
  77. border-style: solid;
  78. border-color: inherit;
  79. }
  80. &:after {
  81. @extend %PseudoClass;
  82. left: 0.1em;
  83. bottom: 0.1em;
  84. width: 0.7em;
  85. height: 0.7em;
  86. border-width: 0.1em;
  87. border-style: solid;
  88. border-color: inherit;
  89. background-color: $vxe-icon-background-color;
  90. }
  91. }
  92. .vxe-icon--menu {
  93. $yOffset: 0.36em;
  94. @extend %DefaultWidthHeight;
  95. &:before {
  96. content: "";
  97. display: inline-block;
  98. width: 0.22em;
  99. height: 0.22em;
  100. box-shadow: 0 -#{$yOffset} 0, -#{$yOffset} -#{$yOffset} 0, #{$yOffset} -#{$yOffset} 0, 0 0 0 1em inset, -#{$yOffset} 0 0, #{$yOffset} 0 0, 0 #{$yOffset} 0, -#{$yOffset} #{$yOffset} 0, #{$yOffset} #{$yOffset} 0;
  101. margin: 0.26em;
  102. }
  103. }
  104. %Caret {
  105. @extend %DefaultWidthHeight;
  106. &:before {
  107. @extend %PseudoClass;
  108. border-width: 0.4em;
  109. border-style: solid;
  110. border-color: transparent;
  111. }
  112. }
  113. .vxe-icon--caret-top {
  114. @extend %Caret;
  115. &:before {
  116. left: 0.1em;
  117. bottom: 0.3em;
  118. border-bottom-color: inherit;
  119. }
  120. }
  121. .vxe-icon--caret-bottom {
  122. @extend %Caret;
  123. &:before {
  124. left: 0.1em;
  125. top: 0.3em;
  126. border-top-color: inherit;
  127. }
  128. }
  129. .vxe-icon--caret-left {
  130. @extend %Caret;
  131. &:before {
  132. right: 0.3em;
  133. bottom: 0.1em;
  134. border-right-color: inherit;
  135. }
  136. }
  137. .vxe-icon--caret-right {
  138. @extend %Caret;
  139. &:before {
  140. left: 0.3em;
  141. bottom: 0.1em;
  142. border-left-color: inherit;
  143. }
  144. }
  145. %BeforeArrowTop {
  146. &:before {
  147. @extend %PseudoClass;
  148. top: 0.32em;
  149. left: 0.12em;
  150. width: 0.6em;
  151. height: 0.6em;
  152. border-width: 0.1em;
  153. border-style: solid;
  154. border-top-color: inherit;
  155. border-right-color: inherit;
  156. border-bottom-color: transparent;
  157. border-left-color: transparent;
  158. }
  159. }
  160. .vxe-icon--arrow-top {
  161. @extend %DefaultWidthHeight;
  162. &:before {
  163. @extend %PseudoClass;
  164. top: 0.4em;
  165. left: 0.14em;
  166. width: 0.7em;
  167. height: 0.7em;
  168. border-width: 0.15em;
  169. border-style: solid;
  170. border-top-color: inherit;
  171. border-right-color: inherit;
  172. border-bottom-color: transparent;
  173. border-left-color: transparent;
  174. border-radius: 0.15em;
  175. transform: rotate(-45deg);
  176. }
  177. }
  178. .vxe-icon--arrow-bottom {
  179. @extend .vxe-icon--arrow-top;
  180. &:before {
  181. top: 0;
  182. left: 0.14em;
  183. transform: rotate(135deg);
  184. }
  185. }
  186. .vxe-icon--arrow-left {
  187. @extend .vxe-icon--arrow-top;
  188. &:before {
  189. top: 0.18em;
  190. left: 0.35em;
  191. transform: rotate(-135deg);
  192. }
  193. }
  194. .vxe-icon--arrow-right {
  195. @extend .vxe-icon--arrow-top;
  196. &:before {
  197. top: 0.18em;
  198. left: 0;
  199. transform: rotate(45deg);
  200. }
  201. }
  202. .vxe-icon--d-arrow-left {
  203. @extend %DefaultWidthHeight;
  204. &:before {
  205. left: 0.15em;
  206. }
  207. &:after {
  208. left: 0.58em;
  209. }
  210. &:before,
  211. &:after {
  212. @extend %PseudoClass;
  213. top: 0.18em;
  214. width: 0.7em;
  215. height: 0.7em;
  216. border-width: 0.15em;
  217. border-style: solid;
  218. border-top-color: inherit;
  219. border-right-color: transparent;
  220. border-bottom-color: transparent;
  221. border-left-color: inherit;
  222. border-radius: 0.15em;
  223. transform: rotate(-45deg);
  224. }
  225. }
  226. .vxe-icon--d-arrow-right {
  227. @extend .vxe-icon--d-arrow-left;
  228. &:before,
  229. &:after {
  230. transform: rotate(135deg);
  231. }
  232. &:before {
  233. left: -0.25em;
  234. }
  235. &:after {
  236. left: 0.18em;
  237. }
  238. }
  239. .vxe-icon--funnel {
  240. @extend %DefaultWidthHeight;
  241. &:before {
  242. @extend %PseudoClass;
  243. top: 0.05em;
  244. left: 0;
  245. border-width: 0.5em;
  246. border-style: solid;
  247. border-top-color: inherit;
  248. border-right-color: transparent;
  249. border-bottom-color: transparent;
  250. border-left-color: transparent;
  251. }
  252. &:after {
  253. @extend %PseudoClass;
  254. left: 0.41em;
  255. top: 0.4em;
  256. width: 0;
  257. height: 0.5em;
  258. border-width: 0 0.2em 0 0;
  259. border-style: solid;
  260. border-right-color: inherit;
  261. }
  262. }
  263. .vxe-icon--edit-outline {
  264. @extend %DefaultWidthHeight;
  265. &:before {
  266. @extend %PseudoClass;
  267. height: 0.84em;
  268. width: 0.86em;
  269. top: 0.1em;
  270. left: 0.02em;
  271. border-radius: 0.2em;
  272. border-width: 0.1em;
  273. border-style: solid;
  274. border-color: inherit;
  275. }
  276. &:after {
  277. @extend %PseudoClass;
  278. left: 0.6em;
  279. bottom: 0.2em;
  280. width: 0;
  281. height: 0.8em;
  282. border-radius: 0 0 80% 80%;
  283. border-width: 0 0 0 0.22em;
  284. border-style: solid;
  285. border-color: inherit;
  286. transform: rotate(45deg);
  287. }
  288. }
  289. .vxe-icon--more {
  290. @extend %DefaultWidthHeight;
  291. &:before {
  292. @extend %PseudoClass;
  293. content: "...";
  294. top: 0;
  295. left: 0.1em;
  296. line-height: 0.5em;
  297. font-weight: 700;
  298. }
  299. }
  300. .vxe-icon--plus {
  301. @extend %DefaultWidthHeight;
  302. &:before {
  303. @extend %PseudoClass;
  304. content: "+";
  305. left: -0.05em;
  306. bottom: 0;
  307. line-height: 0.9em;
  308. font-size: 1.4em;
  309. }
  310. }
  311. .vxe-icon--check {
  312. @extend %DefaultWidthHeight;
  313. &:before {
  314. @extend %PseudoClass;
  315. left: 0.25em;
  316. bottom: 0.2em;
  317. width: 0.5em;
  318. height: 0.9em;
  319. border-width: 0.15em;
  320. border-style: solid;
  321. border-top-color: transparent;
  322. border-right-color: inherit;
  323. border-bottom-color: inherit;
  324. border-radius: 0.15em;
  325. border-left-color: transparent;
  326. transform: rotate(45deg);
  327. }
  328. }
  329. .vxe-icon--close {
  330. @extend %DefaultWidthHeight;
  331. &:before {
  332. @extend %PseudoClass;
  333. content: "\D7";
  334. left: -0.05em;
  335. bottom: 0;
  336. line-height: 0.8em;
  337. font-size: 1.4em;
  338. }
  339. }
  340. .vxe-icon--minus {
  341. @extend %DefaultWidthHeight;
  342. &:before {
  343. @extend %PseudoClass;
  344. content: "\2500";
  345. left: 0;
  346. bottom: 0;
  347. width: 100%;
  348. text-align: center;
  349. line-height: 0.9em;
  350. font-size: 1.2em;
  351. }
  352. }
  353. .vxe-icon--refresh {
  354. @extend %DefaultWidthHeight;
  355. border-width: 0.1em;
  356. border-style: solid;
  357. border-radius: 50%;
  358. border-right-color: transparent !important;
  359. border-left-color: transparent !important;
  360. &:before {
  361. left: 50%;
  362. top: 0;
  363. transform: translateX(50%) rotate(-45deg);
  364. }
  365. &:after {
  366. right: 50%;
  367. bottom: 0;
  368. transform: translateX(-50%) rotate(135deg);
  369. }
  370. &:before,
  371. &:after {
  372. @extend %PseudoClass;
  373. width: 0;
  374. height: 0;
  375. border-width: 0.25em;
  376. border-style: solid;
  377. border-right-color: transparent;
  378. border-bottom-color: transparent;
  379. border-left-color: transparent;
  380. }
  381. &.roll {
  382. animation: rollCircle 1s infinite linear;
  383. }
  384. }
  385. @keyframes rollCircle {
  386. 0% {
  387. transform: rotate(0deg);
  388. }
  389. 100% {
  390. transform: rotate(360deg);
  391. }
  392. }
  393. %BeforeSolidRadius {
  394. content: "";
  395. border-radius: 50%;
  396. border-width: 0.5em;
  397. border-style: solid;
  398. border-color: inherit;
  399. position: absolute;
  400. top: 0;
  401. left: 0;
  402. transform: scale(0.95);
  403. }
  404. %QuestionAndInfoWarning {
  405. &:after {
  406. @extend %PseudoClass;
  407. left: 0;
  408. bottom: 0;
  409. width: 100%;
  410. text-align: center;
  411. color: $vxe-icon-background-color;
  412. transform: rotate(-10deg) scale(0.75);
  413. }
  414. }
  415. .vxe-icon--question {
  416. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  417. &:before {
  418. @extend %BeforeSolidRadius;
  419. }
  420. &:after {
  421. content: "\3F";
  422. }
  423. }
  424. .vxe-icon--info {
  425. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  426. &:before {
  427. @extend %BeforeSolidRadius;
  428. }
  429. &:after {
  430. content: "\A1";
  431. }
  432. }
  433. .vxe-icon--warning {
  434. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  435. &:before {
  436. @extend %BeforeSolidRadius;
  437. }
  438. &:after {
  439. content: "\21";
  440. }
  441. }
  442. .vxe-icon--success {
  443. @extend %DefaultWidthHeight;
  444. &:before {
  445. @extend %BeforeSolidRadius;
  446. }
  447. &:after {
  448. @extend %PseudoClass;
  449. content: "\2713";
  450. left: 0.25em;
  451. bottom: 0;
  452. color: $vxe-icon-background-color;
  453. font-size: 0.65em;
  454. }
  455. }
  456. .vxe-icon--circle-plus {
  457. @extend %DefaultWidthHeight;
  458. &:before {
  459. @extend %BeforeSolidRadius;
  460. }
  461. &:after {
  462. @extend %PseudoClass;
  463. content: "+";
  464. left: 0;
  465. bottom: 0;
  466. width: 100%;
  467. text-align: center;
  468. color: $vxe-icon-background-color;
  469. line-height: 1.4em;
  470. font-size: 0.8em;
  471. }
  472. }
  473. .vxe-icon--remove {
  474. @extend %DefaultWidthHeight;
  475. &:before {
  476. @extend %BeforeSolidRadius;
  477. }
  478. &:after {
  479. @extend %PseudoClass;
  480. content: "\2500";
  481. left: 0;
  482. bottom: 0;
  483. width: 100%;
  484. text-align: center;
  485. line-height: 1.5em;
  486. color: $vxe-icon-background-color;
  487. font-size: 0.7em;
  488. }
  489. }
  490. .vxe-icon--error {
  491. @extend %DefaultWidthHeight;
  492. &:before {
  493. @extend %BeforeSolidRadius;
  494. }
  495. &:after {
  496. @extend %PseudoClass;
  497. content: "\D7";
  498. left: 0;
  499. bottom: 0;
  500. width: 100%;
  501. line-height: 1.4em;
  502. text-align: center;
  503. color: $vxe-icon-background-color;
  504. font-size: 0.8em;
  505. }
  506. }
  507. .vxe-icon--upload,
  508. .vxe-icon--download {
  509. @extend %DefaultWidthHeight;
  510. overflow: hidden;
  511. &:before {
  512. @extend %PseudoClass;
  513. left: 0;
  514. width: 1em;
  515. border-width: 0;
  516. border-style: solid;
  517. border-color: inherit;
  518. }
  519. &:after {
  520. @extend %PseudoClass;
  521. width: 100%;
  522. text-align: center;
  523. font-size: 2em;
  524. }
  525. }
  526. .vxe-icon--upload {
  527. &:before {
  528. top: 0.1em;
  529. border-top-width: 0.1em;
  530. }
  531. &:after {
  532. content: "\2191";
  533. left: 0;
  534. top: 0.15em;
  535. }
  536. }
  537. .vxe-icon--download {
  538. &:before {
  539. bottom: 0.05em;
  540. border-bottom-width: 0.1em;
  541. }
  542. &:after {
  543. content: "\2191";
  544. left: 0;
  545. bottom: 0.15em;
  546. transform: rotate(180deg);
  547. }
  548. }
  549. .vxe-icon--eye,
  550. .vxe-icon--eye-slash {
  551. @extend %DefaultWidthHeight;
  552. &:before {
  553. @extend %PseudoClass;
  554. content: "\25CF";
  555. top: 0.16em;
  556. left: 0;
  557. width: 1em;
  558. height: 0.68em;
  559. line-height: 0.25em;
  560. border-radius: 50%;
  561. border-width: 0.1em;
  562. border-style: solid;
  563. border-color: inherit;
  564. text-align: center;
  565. }
  566. }
  567. .vxe-icon--eye-slash {
  568. &:after {
  569. @extend %PseudoClass;
  570. top: -0.1em;
  571. left: 0.45em;
  572. width: 0;
  573. height: 1.2em;
  574. border-width: 0;
  575. border-style: solid;
  576. border-color: inherit;
  577. border-left-width: 0.1em;
  578. transform: rotate(45deg);
  579. }
  580. }
  581. .vxe-icon--calendar {
  582. @extend %DefaultWidthHeight;
  583. &:before {
  584. @extend %PseudoClass;
  585. top: 0.15em;
  586. left: 0;
  587. width: 1em;
  588. height: 0.8em;
  589. border-width: 0.2em 0.1em 0.1em 0.1em;
  590. border-radius: 0.1em 0.1em 0 0;
  591. border-style: solid;
  592. border-color: inherit;
  593. }
  594. &:after {
  595. @extend %PseudoClass;
  596. left: 0.2em;
  597. top: 0;
  598. width: 0.6em;
  599. height: 0.3em;
  600. border-width: 0 0.1em;
  601. border-style: solid;
  602. border-color: inherit;
  603. }
  604. }
  605. .vxe-icon--dot {
  606. @extend %DefaultWidthHeight;
  607. &:before {
  608. @extend %PseudoClass;
  609. top: 0.25em;
  610. left: 0.25em;
  611. border-radius: 50%;
  612. border-width: 0.25em;
  613. border-style: solid;
  614. border-color: inherit;
  615. }
  616. }
  617. .vxe-icon--print {
  618. @extend %DefaultWidthHeight;
  619. box-shadow: inset 0 0 0 0.1em;
  620. border-width: 0.2em 0;
  621. border-style: solid;
  622. border-color: transparent !important;
  623. border-radius: 0.3em 0.3em 0 0;
  624. &:before {
  625. @extend %PseudoClass;
  626. width: 0.6em;
  627. height: 0.3em;
  628. top: -0.2em;
  629. left: 0.2em;
  630. box-shadow: inset 0 0 0 0.1em;
  631. }
  632. &:after {
  633. @extend %PseudoClass;
  634. width: 0.6em;
  635. height: 0.6em;
  636. left: 0.2em;
  637. bottom: -0.2em;
  638. box-shadow: inset 0 0 0 0.1em;
  639. background-color: $vxe-icon-background-color;
  640. }
  641. }
  642. .vxe-icon--search {
  643. @extend %DefaultWidthHeight;
  644. &:before {
  645. @extend %PseudoClass;
  646. top: 0;
  647. left: 0;
  648. width: 0.8em;
  649. height: 0.8em;
  650. border-width: 0.15em;
  651. border-style: solid;
  652. border-color: inherit;
  653. border-radius: 50%;
  654. }
  655. &:after {
  656. @extend %PseudoClass;
  657. top: 0.75em;
  658. left: 0.6em;
  659. width: 0.35em;
  660. height: 0;
  661. border-width: 0.15em 0 0 0;
  662. border-style: solid;
  663. border-color: inherit;
  664. transform: rotate(45deg);
  665. }
  666. }