File: _button.scss

package info (click to toggle)
sphinx-design 0.7.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 10,900 kB
  • sloc: python: 2,123; xml: 918; javascript: 56; sh: 8; makefile: 3
file content (94 lines) | stat: -rw-r--r-- 2,391 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Adapted from Bootstrap v5.0.2 (https://getbootstrap.com/)
// Copyright 2011-2019 The Bootstrap Authors
// Copyright 2011-2019 Twitter, Inc.
// Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)

.sd-btn {
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  //   color: var(--sd-color-dark);
  cursor: pointer;
  display: inline-block;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.375rem 0.75rem;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  vertical-align: middle;
  user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;

  &:hover {
    text-decoration: none;
  }

  //   &:focus {
  //     box-shadow: 0 0 0 0.2rem rgba(mix($blue, $blue, 15%), .25);
  //     outline: 0;
  //   }

  //   &:visited {
  //     color: var(--sd-color-dark);
  //   }

  //   // override alabaster theme
  //   &.reference {
  //     border-bottom: inherit;
  //   }
  //   &.reference:hover {
  //     border-bottom: inherit;
  //   }
}

@media (prefers-reduced-motion: reduce) {
  .sd-btn {
    transition: none;
  }
}

@each $color, $value in $semantic-colors {
  .sd-btn-#{$color},
  .sd-btn-outline-#{$color}:hover,
  .sd-btn-outline-#{$color}:focus {
    color: var(--sd-color-#{$color}-text) !important;
    background-color: var(--sd-color-#{$color}) !important;
    border-color: var(--sd-color-#{$color}) !important;
    border-width: 1px !important;
    border-style: solid !important;
  }
  .sd-btn-#{$color}:hover,
  .sd-btn-#{$color}:focus {
    color: var(--sd-color-#{$color}-text) !important;
    background-color: var(--sd-color-#{$color}-highlight) !important;
    border-color: var(--sd-color-#{$color}-highlight) !important;
    border-width: 1px !important;
    border-style: solid !important;
  }
  .sd-btn-outline-#{$color} {
    color: var(--sd-color-#{$color}) !important;
    border-color: var(--sd-color-#{$color}) !important;
    border-width: 1px !important;
    border-style: solid !important;
  }
}

// make parent clickable
.sd-stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

.sd-hide-link-text {
  font-size: 0;
}