Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_button.scss « components « sass « assets « static - github.com/curttimson/hugo-theme-massively.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b0b4821e2e1fcdc0c56e607a88965e91582f0176 (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
///
/// Massively by HTML5 UP
/// html5up.net | @ajlkn
/// Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
///

/* Button */

	input[type="submit"],
	input[type="reset"],
	input[type="button"],
	button,
	.button {
		@include vendor('appearance', 'none');
		@include vendor('transition', (
			'background-color #{_duration(transition)} ease-in-out',
			'box-shadow #{_duration(transition)} ease-in-out',
			'color #{_duration(transition)} ease-in-out'
		));
		border: 0;
		border-radius: 0;
		cursor: pointer;
		display: inline-block;
		font-family: _font(family-heading);
		font-size: 0.8rem;
		font-weight: _font(weight-heading);
		letter-spacing: 0.075em;
		height: 3rem;
		line-height: 3rem;
		padding: 0 2rem;
		text-align: center;
		text-decoration: none;
		text-transform: uppercase;
		white-space: nowrap;

		&.icon {
			&:before {
				margin-right: 0.5rem;
			}

			&.solo {
				position: relative;
				width: 4rem;
				height: 4rem;
				line-height: 4rem;
				border-radius: 4rem;
				text-indent: 4rem;
				overflow: hidden;
				padding: 0;
				white-space: nowrap;

				&:before {
					position: absolute;
					display: block;
					top: 0;
					left: 0;
					width: inherit;
					height: inherit;
					line-height: inherit;
					font-size: 1.25rem;
					margin-right: 0;
					text-align: center;
					text-indent: 0;
				}
			}
		}

		&.fit {
			width: 100%;
		}

		&.small {
			font-size: 0.7rem;
			height: 2.5rem;
			line-height: 2.5rem;
			padding: 0 1.5rem;
		}

		&.large {
			font-size: 0.9rem;
			height: 3.5rem;
			line-height: 3.5rem;
			padding: 0 2.75rem;
		}

		@include breakpoint('<=medium') {
			font-size: 0.9rem;
			height: 3.25rem;
			line-height: 3.25rem;

			&.large {
				font-size: 1rem;
				height: 3.75rem;
				line-height: 3.75rem;
			}
		}

		&.disabled,
		&:disabled {
			@include vendor('pointer-events', 'none');
			opacity: 0.25;
		}
	}

	@mixin color-button($p: null) {
		$highlight: _palette($p, highlight);

		input[type="submit"],
		input[type="reset"],
		input[type="button"],
		button,
		.button {
			background-color: transparent;
			box-shadow: inset 0 0 0 2px _palette($p, fg-bold);
			color: _palette($p, fg-bold) !important;

			&:hover {
				box-shadow: inset 0 0 0 2px _palette($p, accent);
				color: _palette($p, accent) !important;
			}

			&.primary {
				background-color: _palette($p, fg-bold);
				box-shadow: none;
				color: _palette($p, bg) !important;

				&:hover {
					background-color: _palette($p, accent);
				}
			}
		}
	}

	@include color-button;