_mixins.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. // ////////////////// //
  2. // GLOBAL SCSS MIXINS //
  3. // ////////////////// //
  4. // Set calculated property
  5. @mixin calc($property, $expression, $important:"") {
  6. #{$property}: -moz-calc(#{$expression}) #{$important};
  7. #{$property}: -o-calc(#{$expression}) #{$important};
  8. #{$property}: -webkit-calc(#{$expression}) #{$important};
  9. #{$property}: calc(#{$expression}) #{$important};
  10. }
  11. // Set CSS3 property for each different browser
  12. @mixin set($property, $value) {
  13. -moz-#{$property}: #{$value};
  14. -o-#{$property}: #{$value};
  15. -webkit-#{$property}: #{$value};
  16. -khtml-#{$property}: #{$value};
  17. -ms-#{$property}: #{$value};
  18. #{$property}: #{$value};
  19. }
  20. @function map-fetch($map, $keys) {
  21. $key: nth($keys, 1);
  22. $length: length($keys);
  23. $value: map-get($map, $key);
  24. @if ($length > 1) {
  25. $rest: ();
  26. @for $i from 2 through $length {
  27. $rest: append($rest, nth($keys, $i));
  28. }
  29. @return map-fetch($value, $rest);
  30. } @else {
  31. @return $value;
  32. }
  33. }
  34. @mixin namedEntityRefColors($color-base, $color-middle, $color-darker) {
  35. background: $color-base;
  36. border-bottom-color: $color-middle;
  37. &.active {
  38. background-color: $color-middle;
  39. border-right-color: $color-middle;
  40. &:not(:first-child) {
  41. border-left-color: $color-middle;
  42. }
  43. }
  44. &:hover {
  45. background-color: $color-middle;
  46. }
  47. }
  48. // add by FS
  49. @mixin lemmatizedEntityRefColors($color-base, $color-middle, $color-darker) {
  50. background: $color-base;
  51. border-bottom-color: $color-middle;
  52. &.active {
  53. background-color: $color-middle;
  54. border-right-color: $color-middle;
  55. &:not(:first-child) {
  56. border-left-color: $color-middle;
  57. }
  58. }
  59. &:hover {
  60. background-color: $color-middle;
  61. }
  62. }
  63. @mixin iperlemmatizedEntityRefColors($color-base, $color-middle, $color-darker) {
  64. background: $color-base;
  65. border-bottom-color: $color-middle;
  66. &.active {
  67. background-color: $color-middle;
  68. border-right-color: $color-middle;
  69. &:not(:first-child) {
  70. border-left-color: $color-middle;
  71. }
  72. }
  73. &:hover {
  74. background-color: $color-middle;
  75. }
  76. }
  77. @mixin headerSectionTitle() {
  78. border-bottom: 1px dotted #666;
  79. margin-bottom: 5px;
  80. font-variant: small-caps;
  81. color: #000;
  82. font-size: 1.2rem;
  83. display: block;
  84. margin-top: 14px;
  85. text-align: left;
  86. }