old-icon.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. @import './variable.scss';
  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.12em;
  306. bottom: -0.1em;
  307. line-height: 1em;
  308. font-size: 1.6em;
  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: "+";
  334. left: -0.1em;
  335. bottom: -0.16em;
  336. line-height: 1em;
  337. font-size: 1.8em;
  338. transform: rotate(45deg);
  339. }
  340. }
  341. .vxe-icon--minus {
  342. @extend %DefaultWidthHeight;
  343. &:before {
  344. @extend %PseudoClass;
  345. content: "\2500";
  346. left: 0;
  347. bottom: 0;
  348. width: 100%;
  349. text-align: center;
  350. line-height: 0.9em;
  351. font-size: 1.2em;
  352. }
  353. }
  354. .vxe-icon--refresh {
  355. @extend %DefaultWidthHeight;
  356. border-width: 0.1em;
  357. border-style: solid;
  358. border-radius: 50%;
  359. border-right-color: transparent !important;
  360. border-left-color: transparent !important;
  361. &:before {
  362. left: 50%;
  363. top: 0;
  364. transform: translateX(50%) rotate(-45deg);
  365. }
  366. &:after {
  367. right: 50%;
  368. bottom: 0;
  369. transform: translateX(-50%) rotate(135deg);
  370. }
  371. &:before,
  372. &:after {
  373. @extend %PseudoClass;
  374. width: 0;
  375. height: 0;
  376. border-width: 0.25em;
  377. border-style: solid;
  378. border-right-color: transparent;
  379. border-bottom-color: transparent;
  380. border-left-color: transparent;
  381. }
  382. &.roll {
  383. animation: rollCircle 1s infinite linear;
  384. }
  385. }
  386. @keyframes rollCircle {
  387. 0% {
  388. transform: rotate(0deg);
  389. }
  390. 100% {
  391. transform: rotate(360deg);
  392. }
  393. }
  394. %BeforeSolidRadius {
  395. content: "";
  396. border-radius: 50%;
  397. border-width: 0.5em;
  398. border-style: solid;
  399. border-color: inherit;
  400. position: absolute;
  401. top: 0;
  402. left: 0;
  403. transform: scale(0.95);
  404. }
  405. %QuestionAndInfoWarning {
  406. &:after {
  407. @extend %PseudoClass;
  408. left: 0;
  409. bottom: 0;
  410. width: 100%;
  411. text-align: center;
  412. color: $vxe-icon-background-color;
  413. transform: rotate(-10deg) scale(0.75);
  414. }
  415. }
  416. .vxe-icon--question {
  417. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  418. &:before {
  419. @extend %BeforeSolidRadius;
  420. }
  421. &:after {
  422. content: "\3F";
  423. }
  424. }
  425. .vxe-icon--info {
  426. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  427. &:before {
  428. @extend %BeforeSolidRadius;
  429. }
  430. &:after {
  431. content: "\A1";
  432. }
  433. }
  434. .vxe-icon--warning {
  435. @extend %DefaultWidthHeight, %QuestionAndInfoWarning;
  436. &:before {
  437. @extend %BeforeSolidRadius;
  438. }
  439. &:after {
  440. content: "\21";
  441. }
  442. }
  443. .vxe-icon--success {
  444. @extend %DefaultWidthHeight;
  445. &:before {
  446. @extend %BeforeSolidRadius;
  447. }
  448. &:after {
  449. @extend %PseudoClass;
  450. content: "\2713";
  451. left: 0.25em;
  452. bottom: 0;
  453. color: $vxe-icon-background-color;
  454. font-size: 0.65em;
  455. }
  456. }
  457. .vxe-icon--circle-plus {
  458. @extend %DefaultWidthHeight;
  459. &:before {
  460. @extend %BeforeSolidRadius;
  461. }
  462. &:after {
  463. @extend %PseudoClass;
  464. content: "+";
  465. left: 0;
  466. bottom: 0;
  467. width: 100%;
  468. text-align: center;
  469. color: $vxe-icon-background-color;
  470. line-height: 1.4em;
  471. font-size: 0.8em;
  472. }
  473. }
  474. .vxe-icon--remove {
  475. @extend %DefaultWidthHeight;
  476. &:before {
  477. @extend %BeforeSolidRadius;
  478. }
  479. &:after {
  480. @extend %PseudoClass;
  481. content: "\2500";
  482. left: 0;
  483. bottom: 0;
  484. width: 100%;
  485. text-align: center;
  486. line-height: 1.5em;
  487. color: $vxe-icon-background-color;
  488. font-size: 0.7em;
  489. }
  490. }
  491. .vxe-icon--error {
  492. @extend %DefaultWidthHeight;
  493. &:before {
  494. @extend %BeforeSolidRadius;
  495. }
  496. &:after {
  497. @extend %PseudoClass;
  498. content: "\D7";
  499. left: 0;
  500. bottom: 0;
  501. width: 100%;
  502. line-height: 1.4em;
  503. text-align: center;
  504. color: $vxe-icon-background-color;
  505. font-size: 0.8em;
  506. }
  507. }
  508. .vxe-icon--upload,
  509. .vxe-icon--download {
  510. @extend %DefaultWidthHeight;
  511. overflow: hidden;
  512. &:before {
  513. @extend %PseudoClass;
  514. left: 0;
  515. width: 1em;
  516. border-width: 0;
  517. border-style: solid;
  518. border-color: inherit;
  519. }
  520. &:after {
  521. @extend %PseudoClass;
  522. width: 100%;
  523. text-align: center;
  524. font-size: 2em;
  525. }
  526. }
  527. .vxe-icon--upload {
  528. &:before {
  529. top: 0.1em;
  530. border-top-width: 0.1em;
  531. }
  532. &:after {
  533. content: "\2191";
  534. left: 0;
  535. top: 0.15em;
  536. }
  537. }
  538. .vxe-icon--download {
  539. &:before {
  540. bottom: 0.05em;
  541. border-bottom-width: 0.1em;
  542. }
  543. &:after {
  544. content: "\2191";
  545. left: 0;
  546. bottom: 0.15em;
  547. transform: rotate(180deg);
  548. }
  549. }
  550. .vxe-icon--eye,
  551. .vxe-icon--eye-slash {
  552. @extend %DefaultWidthHeight;
  553. &:before {
  554. @extend %PseudoClass;
  555. content: "\25CF";
  556. top: 0.16em;
  557. left: 0;
  558. width: 1em;
  559. height: 0.68em;
  560. line-height: 0.25em;
  561. border-radius: 50%;
  562. border-width: 0.1em;
  563. border-style: solid;
  564. border-color: inherit;
  565. text-align: center;
  566. }
  567. }
  568. .vxe-icon--eye-slash {
  569. &:after {
  570. @extend %PseudoClass;
  571. top: -0.1em;
  572. left: 0.45em;
  573. width: 0;
  574. height: 1.2em;
  575. border-width: 0;
  576. border-style: solid;
  577. border-color: inherit;
  578. border-left-width: 0.1em;
  579. transform: rotate(45deg);
  580. }
  581. }
  582. .vxe-icon--calendar {
  583. @extend %DefaultWidthHeight;
  584. &:before {
  585. @extend %PseudoClass;
  586. top: 0.15em;
  587. left: 0;
  588. width: 1em;
  589. height: 0.8em;
  590. border-width: 0.2em 0.1em 0.1em 0.1em;
  591. border-radius: 0.1em 0.1em 0 0;
  592. border-style: solid;
  593. border-color: inherit;
  594. }
  595. &:after {
  596. @extend %PseudoClass;
  597. left: 0.2em;
  598. top: 0;
  599. width: 0.6em;
  600. height: 0.3em;
  601. border-width: 0 0.1em;
  602. border-style: solid;
  603. border-color: inherit;
  604. }
  605. }
  606. .vxe-icon--dot {
  607. @extend %DefaultWidthHeight;
  608. &:before {
  609. @extend %PseudoClass;
  610. top: 0.25em;
  611. left: 0.25em;
  612. border-radius: 50%;
  613. border-width: 0.25em;
  614. border-style: solid;
  615. border-color: inherit;
  616. }
  617. }
  618. .vxe-icon--print {
  619. @extend %DefaultWidthHeight;
  620. box-shadow: inset 0 0 0 0.1em;
  621. border-width: 0.2em 0;
  622. border-style: solid;
  623. border-color: transparent !important;
  624. border-radius: 0.3em 0.3em 0 0;
  625. &:before {
  626. @extend %PseudoClass;
  627. width: 0.6em;
  628. height: 0.3em;
  629. top: -0.2em;
  630. left: 0.2em;
  631. box-shadow: inset 0 0 0 0.1em;
  632. }
  633. &:after {
  634. @extend %PseudoClass;
  635. width: 0.6em;
  636. height: 0.6em;
  637. left: 0.2em;
  638. bottom: -0.2em;
  639. box-shadow: inset 0 0 0 0.1em;
  640. background-color: $vxe-icon-background-color;
  641. }
  642. }
  643. .vxe-icon--search {
  644. @extend %DefaultWidthHeight;
  645. &:before {
  646. @extend %PseudoClass;
  647. top: 0;
  648. left: 0;
  649. width: 0.8em;
  650. height: 0.8em;
  651. border-width: 0.15em;
  652. border-style: solid;
  653. border-color: inherit;
  654. border-radius: 50%;
  655. }
  656. &:after {
  657. @extend %PseudoClass;
  658. top: 0.75em;
  659. left: 0.6em;
  660. width: 0.35em;
  661. height: 0;
  662. border-width: 0.15em 0 0 0;
  663. border-style: solid;
  664. border-color: inherit;
  665. transform: rotate(45deg);
  666. }
  667. }