Rewrite rendering of Vector simple search
[lhc/web/wiklou.git] / skins / vector / components / search.less
1 /* Search */
2 #p-search {
3 /* @noflip */
4 float: left;
5 margin-right: 0.5em;
6 margin-left: 0.5em;
7
8 h3 {
9 display: none;
10 }
11
12 form,
13 input {
14 margin: 0;
15 margin-top: 0.4em;
16 }
17 }
18
19 div#simpleSearch {
20 display: block;
21 width: 14em;
22 height: 1.4em;
23 margin-top: 0.65em;
24 position: relative;
25 min-height: 1px; /* Gotta trigger hasLayout for IE7 */
26 border: solid 1px #aaa;
27 color: black;
28 background-color: white;
29 .background-image('images/search-fade.png');
30 background-position: top left;
31 background-repeat: repeat-x;
32 }
33
34 // Styles for both the search input and the button
35 div#simpleSearch input {
36 position: absolute;
37 margin: 0;
38 padding: 0;
39 border: 0;
40 color: black;
41 background-color: transparent;
42 }
43
44 // The search input
45 div#simpleSearch #searchInput {
46 top: 0;
47 left: 0;
48 width: 90%;
49 padding: 0.2em 0 0.2em 0.2em;
50 font-size: 13px;
51 direction: ltr;
52 }
53
54 div#simpleSearch #searchInput:focus {
55 outline: none;
56 }
57
58 div#simpleSearch input {
59 color: black;
60 }
61
62 // Placeholder colors. These rules MAY NOT be merged because of how
63 // CSS requires browsers to parse unrecognized selectors!
64 div#simpleSearch #searchInput.placeholder {
65 color: #999;
66 }
67 div#simpleSearch #searchInput::-webkit-input-placeholder {
68 color: #999;
69 }
70 div#simpleSearch #searchInput:-moz-placeholder {
71 color: #999;
72 }
73 div#simpleSearch #searchInput:-ms-input-placeholder {
74 color: #999;
75 }
76
77 // Undo the styles Webkit browsers apply to type=search fields,
78 // we provide our own
79 div#simpleSearch #searchInput {
80 -webkit-appearance: textfield;
81 }
82 div#simpleSearch #searchInput::-webkit-search-decoration,
83 div#simpleSearch #searchInput::-webkit-search-cancel-button,
84 div#simpleSearch #searchInput::-webkit-search-results-button,
85 div#simpleSearch #searchInput::-webkit-search-results-decoration {
86 -webkit-appearance: textfield;
87 }
88
89 // The buttons. They are displayed in the same position, and if both are
90 // present the fulltext search one obscures the 'Go' one.
91 div#simpleSearch #searchButton,
92 div#simpleSearch #mw-searchButton {
93 top: 0;
94 right: 0;
95 width: 10%;
96 height: 100%;
97 cursor: pointer;
98 /* Hide button text and replace it with the image. */
99 text-indent: 100%;
100 /* Needed to make IE6 respect the text-indent. */
101 line-height: 1;
102 /* Opera 12 on RTL flips the text in a funny way without this. */
103 /* @noflip */
104 direction: ltr;
105 white-space: nowrap;
106 overflow: hidden;
107 /* @embed */
108 background: transparent url(images/search-ltr.png) center center no-repeat;
109 }
110
111 div#simpleSearch #mw-searchButton {
112 z-index: 1;
113 }
114
115
116 // The following styles exist only for backwards-compatibility with
117 // cached HTML and are to be removed before 1.23 release.
118
119 /* Fix direction changed for awful hacks */
120 .sitedir-ltr div#simpleSearch button#searchButton {
121 /* @noflip */
122 direction: ltr;
123 }
124 .sitedir-rtl div#simpleSearch button#searchButton {
125 /* @noflip */
126 direction: rtl;
127 }
128
129 div#simpleSearch button#searchButton {
130 position: absolute;
131 padding: 0;
132 padding-top: 0.3em;
133 padding-bottom: 0.2em;
134 padding-right: 0.4em;
135 margin: 0;
136 border: none;
137 background-image: none;
138 text-indent: 0;
139 }
140
141 /* OVERRIDDEN BY COMPLIANT BROWSERS */
142 div#simpleSearch button#searchButton img {
143 border: none;
144 margin: 0;
145 margin-top: -3px;
146 padding: 0;
147 }
148
149 /* IGNORED BY IE6 */
150 div#simpleSearch button#searchButton > img {
151 margin: 0;
152 }
153