summaryrefslogtreecommitdiff
path: root/vendor/oojs/oojs-ui/src/styles/widgets/TextInputWidget.less
blob: dd0cdf46a7bc3448247d4ebbcd4be597e37de394 (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
@import '../common';

.oo-ui-textInputWidget {
	position: relative;
	// Necessary for proper alignment when used with display: inline-block
	vertical-align: middle;
	.oo-ui-box-sizing(border-box);

	input,
	textarea {
		display: inline-block;
		width: 100%;
		resize: none;
		.oo-ui-box-sizing(border-box);
	}

	> .oo-ui-iconElement-icon,
	> .oo-ui-indicatorElement-indicator,
	> .oo-ui-labelElement-label {
		display: none;
	}

	&.oo-ui-iconElement > .oo-ui-iconElement-icon,
	&.oo-ui-indicatorElement > .oo-ui-indicatorElement-indicator {
		display: block;
		position: absolute;
		top: 0;
		height: 100%;
		background-repeat: no-repeat;

		.oo-ui-unselectable();
	}

	&.oo-ui-widget-enabled {
		> .oo-ui-iconElement-icon,
		> .oo-ui-indicatorElement-indicator {
			cursor: pointer;
		}
	}

	&.oo-ui-labelElement > .oo-ui-labelElement-label {
		display: block;
	}

	> .oo-ui-iconElement-icon {
		left: 0;
	}

	> .oo-ui-indicatorElement-indicator {
		right: 0;
	}

	> .oo-ui-labelElement-label {
		position: absolute;
		top: 0;
	}

	&-labelPosition-after {
		> .oo-ui-labelElement-label {
			right: 0
		}
	}

	&-labelPosition-before {
		> .oo-ui-labelElement-label {
			left: 0
		}
	}

	.theme-oo-ui-textInputWidget();
}