_forms.less 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196
  1. // /**
  2. // * Copyright © Magento, Inc. All rights reserved.
  3. // * See COPYING.txt for license details.
  4. // */
  5. // # Forms mixins
  6. //
  7. // Magento UI library provides a set of mixins for forms elements customization. You can customize your forms globally by configuring global variables, or you can customize every form separately using appropriate mixin.
  8. //
  9. // **Note**: in variables lists allowable values are in "[]" brackets. If there are no allowable values provided, for this variable you can use: '' | false | value.
  10. //
  11. // # Global forms elements customization
  12. // The <code>.lib-form-element-all()</code> mixin is used to set default styles for all form elements in the theme. To configure these elements global variables are used.
  13. //
  14. // # Fieldsets & fields customization
  15. //
  16. // The <code>.lib-form-fieldset()</code> mixin is used to customize form fieldset borders and legend.
  17. //
  18. // The <code>.lib-form-field()</code> mixin is used to customize form elements.
  19. //
  20. // The <code>.lib-form-hasrequired()</code> mixin is used to show and customize "required fields" message if the form or fieldset has required fields and a <code>data-hasrequired</code> attribute.
  21. //
  22. // Using these mixins you can customize your forms. By default these mixins use global variables.
  23. //
  24. // ## Simple form with "required fields" message
  25. //
  26. // ```html
  27. // <form class="example-form-1">
  28. // <fieldset class="example-form-1-fieldset" data-hasrequired="* Required Fields">
  29. // <legend class="legend"><span>Sign-in Information</span></legend><br>
  30. //
  31. // <div class="field password required">
  32. // <label for="password" class="label"><span>Password</span></label>
  33. //
  34. // <div class="control">
  35. // <input type="password" name="password" id="password" title="Password">
  36. // </div>
  37. // </div>
  38. //
  39. // <div class="field confirmation required">
  40. // <label for="confirmation" class="label"><span>Confirm Password</span></label>
  41. //
  42. // <div class="control">
  43. // <input type="password" name="confirmation" title="Confirm Password" id="confirmation">
  44. // </div>
  45. // </div>
  46. //
  47. // <div class="field password required">
  48. // <label for="password2" class="label"><span>Password</span></label>
  49. //
  50. // <div class="control">
  51. // <input type="password" name="password2" id="password2" title="Password">
  52. // </div>
  53. // </div>
  54. //
  55. // <div class="field textarea">
  56. // <label for="textarea2" class="label"><span>Textarea</span></label>
  57. //
  58. // <div class="control">
  59. // <textarea rows="3" cols="5" id="textarea2" name="textarea2"></textarea>
  60. // <div class="note">Please enter your message here</div>
  61. // </div>
  62. // </div>
  63. //
  64. // <div class="field file">
  65. // <label for="file2" class="label"><span>File field</span></label>
  66. //
  67. // <div class="control">
  68. // <input type="file" id="file2" value="" name="file2">
  69. // <div class="note">Please choose your picture here</div>
  70. // </div>
  71. // </div>
  72. //
  73. // <div class="field choice">
  74. // <input type="radio" id="radio2" checked="" value="1" name="radio2">
  75. //
  76. // <label for="radio2" class="label"><span>Radiobutton choice</span></label>
  77. // </div>
  78. //
  79. // <div class="field choice">
  80. // <input type="checkbox" id="checkbox2" value="1" name="checkbox2">
  81. //
  82. // <label for="checkbox2" class="label"><span>Checkbox choice</span></label>
  83. // </div>
  84. //
  85. // <div class="field region">
  86. // <label for="select2" class="label"><span>Select</span></label>
  87. //
  88. // <div class="control">
  89. // <select name="select2" id="select2">
  90. // <option value="">Please select</option>
  91. // <option value="5">5</option>
  92. // <option value="10">10</option>
  93. // <option value="15">15</option>
  94. // <option value="20">20</option>
  95. // </select>
  96. // </div>
  97. // </div>
  98. //
  99. // <div class="field multiselect">
  100. // <label for="multiselect2" class="label"><span>Multiple select</span></label>
  101. //
  102. // <div class="control">
  103. // <select name="multiselect2" id="multiselect2" multiple="multiple">
  104. // <option value="Option 1">Option 1</option>
  105. // <option value="Option 2">Option 2</option>
  106. // <option value="Option 3">Option 3</option>
  107. // <option value="Option 4">Option 4</option>
  108. // <option value="Option 5">Option 5</option>
  109. // <option value="Option 6">Option 6</option>
  110. // <option value="Option 7">Option 7</option>
  111. // </select>
  112. // </div>
  113. // </div>
  114. // </fieldset>
  115. // </form>
  116. // ```
  117. //
  118. // ## Form with fields in 2 columns
  119. //
  120. // ```html
  121. // <form class="example-form-2" action="#" method="post">
  122. // <fieldset class="example-form-2-fieldset">
  123. // <legend class="legend"><span>Personal Information</span></legend><br>
  124. //
  125. // <div class="field name firstname required">
  126. // <label class="label" for="firstname"><span>First Name</span></label>
  127. //
  128. // <div class="control">
  129. // <input type="text" id="firstname" name="firstname" value="" title="First Name">
  130. // </div>
  131. // </div>
  132. //
  133. // <div class="field name lastname required">
  134. // <label class="label" for="lastname"><span>Last Name</span></label>
  135. //
  136. // <div class="control">
  137. // <input type="text" id="lastname" name="lastname" value="" title="Last Name">
  138. // </div>
  139. // </div>
  140. //
  141. // <div class="field required">
  142. // <label for="email_address" class="label"><span>Email Address</span></label>
  143. //
  144. // <div class="control">
  145. // <input type="email" name="email" id="email_address" value="" title="Email Address">
  146. // </div>
  147. // </div>
  148. //
  149. // <div class="field textarea">
  150. // <label for="textarea" class="label"><span>Textarea</span></label>
  151. //
  152. // <div class="control">
  153. // <textarea rows="3" cols="5" id="textarea" name="textarea"></textarea>
  154. // <div class="note">Please enter your message here</div>
  155. // </div>
  156. // </div>
  157. //
  158. // <div class="field file">
  159. // <label for="file" class="label"><span>File field</span></label>
  160. //
  161. // <div class="control">
  162. // <input type="file" id="file" value="" name="file">
  163. // <div class="note">Please choose your picture here</div>
  164. // </div>
  165. // </div>
  166. //
  167. // <div class="field choice">
  168. // <input type="radio" id="radio" checked="" value="1" name="radio">
  169. //
  170. // <label for="radio" class="label"><span>Radiobutton choice</span></label>
  171. // </div>
  172. //
  173. // <div class="field choice">
  174. // <input type="checkbox" id="checkbox" value="1" name="checkbox">
  175. //
  176. // <label for="checkbox" class="label"><span>Checkbox choice</span></label>
  177. // </div>
  178. //
  179. // <div class="field region">
  180. // <label for="select" class="label"><span>Select</span></label>
  181. //
  182. // <div class="control">
  183. // <select name="select" id="select">
  184. // <option value="">Please select</option>
  185. // <option value="5">5</option>
  186. // <option value="10">10</option>
  187. // <option value="15">15</option>
  188. // <option value="20">20</option>
  189. // </select>
  190. // </div>
  191. // </div>
  192. //
  193. // <div class="field multiselect">
  194. // <label for="multiselect" class="label"><span>Multiple select</span></label>
  195. //
  196. // <div class="control">
  197. // <select name="multiselect" id="multiselect" multiple="multiple">
  198. // <option value="Option 1">Option 1</option>
  199. // <option value="Option 2">Option 2</option>
  200. // <option value="Option 3">Option 3</option>
  201. // <option value="Option 4">Option 4</option>
  202. // <option value="Option 5">Option 5</option>
  203. // <option value="Option 6">Option 6</option>
  204. // <option value="Option 7">Option 7</option>
  205. // </select>
  206. // </div>
  207. // </div>
  208. // </fieldset>
  209. // </form>
  210. // ```
  211. //
  212. .example-form-1 {
  213. .example-form-1-fieldset {
  214. .lib-form-fieldset();
  215. .lib-form-hasrequired(bottom);
  216. > .field {
  217. .lib-form-field();
  218. }
  219. }
  220. }
  221. .example-form-2 {
  222. .example-form-2-fieldset {
  223. .lib-form-fieldset();
  224. > .field {
  225. .lib-form-field(
  226. @_type: block,
  227. @_column: true
  228. );
  229. }
  230. }
  231. }
  232. // # Fieldset and legend customization variables
  233. //
  234. // The <code>.lib-form-fieldset()</code> mixin variables
  235. // <pre>
  236. // <table>
  237. // <tr>
  238. // <th class="vars_head">Mixin variable</th>
  239. // <th class="vars_head">Global variable</th>
  240. // <th class="vars_head">Default value</th>
  241. // <th class="vars_head">Comment</th>
  242. // </tr>
  243. // <tr>
  244. // <th>@_border</th>
  245. // <td class="vars_value">@form-fieldset__border</td>
  246. // <td class="vars_value">0</td>
  247. // <td>Fieldset border</td>
  248. // </tr>
  249. // <tr>
  250. // <th>@_margin</th>
  251. // <td class="vars_value">@form-fieldset__margin</td>
  252. // <td class="vars_value"> 0 0 @indent__xl</td>
  253. // <td>Fieldset margin</td>
  254. // </tr>
  255. // <tr>
  256. // <th>@_padding</th>
  257. // <td class="vars_value">@form-fieldset__padding</td>
  258. // <td class="vars_value">0</td>
  259. // <td>Fieldset padding</td>
  260. // </tr>
  261. // <tr>
  262. // <th>@_legend-color</th>
  263. // <td class="vars_value">@form-fieldset-legend__color</td>
  264. // <td class="vars_value">false</td>
  265. // <td>Legend color</td>
  266. // </tr>
  267. // <tr>
  268. // <th>@_legend-font-size</th>
  269. // <td class="vars_value">@form-fieldset-legend__font-size</td>
  270. // <td class="vars_value">20px</td>
  271. // <td>Legend font size</td>
  272. // </tr>
  273. // <tr>
  274. // <th>@_legend-font-family</th>
  275. // <td class="vars_value">@form-fieldset-legend__font-family</td>
  276. // <td class="vars_value">false</td>
  277. // <td>Legend font family</td>
  278. // </tr>
  279. // <tr>
  280. // <th>@_legend-font-weight</th>
  281. // <td class="vars_value">@form-fieldset-legend__font-weight</td>
  282. // <td class="vars_value">false</td>
  283. // <td>Legend font weight</td>
  284. // </tr>
  285. // <tr>
  286. // <th>@_legend-font-style</th>
  287. // <td class="vars_value">@form-fieldset-legend__font-style</td>
  288. // <td class="vars_value">false</td>
  289. // <td>Legend font style</td>
  290. // </tr>
  291. // <tr>
  292. // <th>@_legend-line-height</th>
  293. // <td class="vars_value">@form-fieldset-legend__line-height</td>
  294. // <td class="vars_value">1.2</td>
  295. // <td>Legend line height</td>
  296. // </tr>
  297. // <tr>
  298. // <th>@_legend-margin</th>
  299. // <td class="vars_value">@form-fieldset-legend__margin</td>
  300. // <td class="vars_value">0 0 @indent__m</td>
  301. // <td>Legend margin</td>
  302. // </tr>
  303. // <tr>
  304. // <th>@_legend-padding</th>
  305. // <td class="vars_value">@form-fieldset-legend__padding</td>
  306. // <td class="vars_value">0</td>
  307. // <td>Legend padding</td>
  308. // </tr>
  309. // <tr>
  310. // <th>@_legend-width</th>
  311. // <td class="vars_value">@form-fieldset-legend__width</td>
  312. // <td class="vars_value">false</td>
  313. // <td>Legend width</td>
  314. // </tr>
  315. // </table>
  316. // </pre>
  317. //
  318. // # Fields customization variables
  319. //
  320. // The <code>.lib-form-field()</code> mixin variables
  321. //
  322. // <pre>
  323. // <table>
  324. // <tr>
  325. // <th class="vars_head">Mixin variable</th>
  326. // <th class="vars_head">Global variable</th>
  327. // <th class="vars_head">Default values [Allowable values]</th>
  328. // <th class="vars_head">Comment</th>
  329. // </tr>
  330. // <tr>
  331. // <th>@_type</th>
  332. // <td class="vars_value">@form-field-type</td>
  333. // <td class="vars_value">inline [inline | block]</td>
  334. // <td>How to display from field element and its label. When set to 'inline' they are displayed side-by-side. When set to 'block' the label is displayed above the control</td>
  335. // </tr>
  336. // <tr>
  337. // <th>@_border</th>
  338. // <td class="vars_value">@form-field__border</td>
  339. // <td class="vars_value">false</td>
  340. // <td>Border of the &lt;div class=&quot;field&quot;&gt; element</td>
  341. // </tr>
  342. // <tr>
  343. // <th>@_column</th>
  344. // <td class="vars_value">@form-field-column</td>
  345. // <td class="vars_value">false [true | false]</td>
  346. // <td>Form fields are displayed in columns</td>
  347. // </tr>
  348. // <tr>
  349. // <th>@_column-padding</th>
  350. // <td class="vars_value">@form-field-column__padding</td>
  351. // <td class="vars_value">0 12px 0 0</td>
  352. // <td>Form fields column padding</td>
  353. // </tr>
  354. // <tr>
  355. // <th>@_column-number</th>
  356. // <td class="vars_value">@form-field-column__number</td>
  357. // <td class="vars_value">2</td>
  358. // <td>Form fields number of columns</td>
  359. // </tr>
  360. // <tr>
  361. // <th>@_type-block-margin</th>
  362. // <td class="vars_value">@form-field-type-block__margin</td>
  363. // <td class="vars_value">0 0 @form-field__vertical-indent</td>
  364. // <td>Form fields margin if @form-field-type set to is 'block'</td>
  365. // </tr>
  366. // <tr>
  367. // <th>@_type-inline-margin</th>
  368. // <td class="vars_value">@form-field-type-inline__margin</td>
  369. // <td class="vars_value">0 0 @form-field__vertical-indent</td>
  370. // <td>Form fields margin if @form-field-type is set to 'inline'</td>
  371. // </tr>
  372. // <tr>
  373. // <th colspan="4" class="vars_section">Form field label</th>
  374. // </tr>
  375. // <tr>
  376. // <th>@_label-color</th>
  377. // <td class="vars_value">@form-field-label__align</td>
  378. // <td class="vars_value">false</td>
  379. // <td>Field label text color</td>
  380. // </tr>
  381. // <tr>
  382. // <th>@_label-color</th>
  383. // <td class="vars_value">@form-field-label__color</td>
  384. // <td class="vars_value">false</td>
  385. // <td>Field label text color</td>
  386. // </tr>
  387. // <tr>
  388. // <th>@_label-font-size</th>
  389. // <td class="vars_value">@form-field-label__font-size</td>
  390. // <td class="vars_value">false</td>
  391. // <td>Field label font size</td>
  392. // </tr>
  393. // <tr>
  394. // <th>@_label-font-family</th>
  395. // <td class="vars_value">@form-field-label__font-family</td>
  396. // <td class="vars_value">false</td>
  397. // <td>Field label font family</td>
  398. // </tr>
  399. // <tr>
  400. // <th>@_label-font-weight</th>
  401. // <td class="vars_value">@form-field-label__font-weight</td>
  402. // <td class="vars_value">@font-weight__bold</td>
  403. // <td>Field label font weight</td>
  404. // </tr>
  405. // <tr>
  406. // <th>@_label-font-style</th>
  407. // <td class="vars_value">@form-field-label__font-style</td>
  408. // <td class="vars_value">false</td>
  409. // <td>Field label font style</td>
  410. // </tr>
  411. // <tr>
  412. // <th>@_label-line-height</th>
  413. // <td class="vars_value">@form-field-label__line-height</td>
  414. // <td class="vars_value">false</td>
  415. // <td>Field label line height</td>
  416. // </tr>
  417. // <tr>
  418. // <th>@_type-block-label-margin</th>
  419. // <td class="vars_value">@form-field-type-label-block__margin</td>
  420. // <td class="vars_value">0 0 @indent__xs</td>
  421. // <td>Field label margin if @form-field-type is set to 'block'</td>
  422. // </tr>
  423. // <tr>
  424. // <th>@_type-inline-label-padding</th>
  425. // <td class="vars_value">@form-field-type-label-inline__padding</td>
  426. // <td class="vars_value" nowrap>@form-field-type-label-inline__padding-top 15px 0 0</td>
  427. // <td>Field label padding if @form-field-type is set to 'inline'</td>
  428. // </tr>
  429. // <tr>
  430. // <th>@_type-inline-label-width</th>
  431. // <td class="vars_value">@form-field-type-label-inline__width</td>
  432. // <td class="vars_value">25.8%</td>
  433. // <td>Field label width if @form-field-type is set to 'inline'</td>
  434. // </tr>
  435. // <tr>
  436. // <th>@_type-inline-control-width</th>
  437. // <td class="vars_value">@form-field-type-control-inline__width</td>
  438. // <td class="vars_value">74.2%</td>
  439. // <td>Field control width if @form-field-type is set to 'inline'</td>
  440. // </tr>
  441. // <tr>
  442. // <th colspan="4" class="vars_section">Label &quot;required&quot; asterisk</th>
  443. // </tr>
  444. // <tr>
  445. // <th>@_label-asterisk-color</th>
  446. // <td class="vars_value">@form-field-label-asterisk__color</td>
  447. // <td class="vars_value">#da370a</td>
  448. // <td>Label asterisk color</td>
  449. // </tr>
  450. // <tr>
  451. // <th>@_label-asterisk-font-size</th>
  452. // <td class="vars_value">@form-field-label-asterisk__font-size</td>
  453. // <td class="vars_value">@font-size__s</td>
  454. // <td>Label asterisk font size</td>
  455. // </tr>
  456. // <tr>
  457. // <th>@_label-asterisk-font-family</th>
  458. // <td class="vars_value">@form-field-label-asterisk__font-family</td>
  459. // <td class="vars_value">false</td>
  460. // <td>Label asterisk font family</td>
  461. // </tr>
  462. // <tr>
  463. // <th>@_label-asterisk-font-weight</th>
  464. // <td class="vars_value">@form-field-label-asterisk__font-weight</td>
  465. // <td class="vars_value">false</td>
  466. // <td>Label asterisk font weight</td>
  467. // </tr>
  468. // <tr>
  469. // <th>@_label-asterisk-font-style</th>
  470. // <td class="vars_value">@form-field-label-asterisk__font-style</td>
  471. // <td class="vars_value">false</td>
  472. // <td>Label asterisk font style</td>
  473. // </tr>
  474. // <tr>
  475. // <th>@_label-asterisk-line-height</th>
  476. // <td class="vars_value">@form-field-label-asterisk__line-height</td>
  477. // <td class="vars_value">false</td>
  478. // <td>Label asterisk line height</td>
  479. // </tr>
  480. // <tr>
  481. // <th>@_label-asterisk-margin</th>
  482. // <td class="vars_value">@form-field-label-asterisk__margin</td>
  483. // <td class="vars_value">0 0 0 @indent__xs</td>
  484. // <td>Label asterisk margin</td>
  485. // </tr>
  486. // <tr>
  487. // <th colspan="4" class="vars_section">Field note</th>
  488. // </tr>
  489. // <tr>
  490. // <th>@_note-color</th>
  491. // <td class="vars_value">@form-field-note__color</td>
  492. // <td class="vars_value">false</td>
  493. // <td>Field note text color</td>
  494. // </tr>
  495. // <tr>
  496. // <th>@_note-font-size</th>
  497. // <td class="vars_value">@form-field-note__font-size</td>
  498. // <td class="vars_value">@font-size__s</td>
  499. // <td>Field note font size</td>
  500. // </tr>
  501. // <tr>
  502. // <th>@_note-font-family</th>
  503. // <td class="vars_value">@form-field-note__font-family</td>
  504. // <td class="vars_value">false</td>
  505. // <td>Field note font family</td>
  506. // </tr>
  507. // <tr>
  508. // <th>@_note-font-weight</th>
  509. // <td class="vars_value">@form-field-note__font-weight</td>
  510. // <td class="vars_value">false</td>
  511. // <td>Field note font weight</td>
  512. // </tr>
  513. // <tr>
  514. // <th>@_note-font-style</th>
  515. // <td class="vars_value">@form-field-note__font-style</td>
  516. // <td class="vars_value">false</td>
  517. // <td>Field note font style</td>
  518. // </tr>
  519. // <tr>
  520. // <th>@_note-line-height</th>
  521. // <td class="vars_value">@form-field-note__line-height</td>
  522. // <td class="vars_value">false</td>
  523. // <td>Field note line height</td>
  524. // </tr>
  525. // <tr>
  526. // <th>@_note-margin</th>
  527. // <td class="vars_value">@form-field-note__margin</td>
  528. // <td class="vars_value">3px 0 0</td>
  529. // <td>Field note margin</td>
  530. // </tr>
  531. // <tr>
  532. // <th>@_note-padding</th>
  533. // <td class="vars_value">@form-field-note__padding</td>
  534. // <td class="vars_value">0</td>
  535. // <td>Field note padding</td>
  536. // </tr>
  537. // <tr>
  538. // <th>@_note-icon-font-content</th>
  539. // <td class="vars_value">@form-field-note-icon-font__content</td>
  540. // <td class="vars_value">@icon-pointer-up</td>
  541. // <td>Field note icon code</td>
  542. // </tr>
  543. // <tr>
  544. // <th>@_note-icon-font</th>
  545. // <td class="vars_value">@form-field-note-icon-font</td>
  546. // <td class="vars_value">@icon-font</td>
  547. // <td>Field note icon font</td>
  548. // </tr>
  549. // <tr>
  550. // <th>@_note-icon-font-size</th>
  551. // <td class="vars_value">@form-field-note-icon-font__size</td>
  552. // <td class="vars_value">@form-field-note__font-size*2</td>
  553. // <td>Field note icon font size</td>
  554. // </tr>
  555. // <tr>
  556. // <th>@_note-icon-font-line-height</th>
  557. // <td class="vars_value">@form-field-note-icon-font__line-height</td>
  558. // <td class="vars_value">@form-field-note__font-size</td>
  559. // <td>Field note icon line height</td>
  560. // </tr>
  561. // <tr>
  562. // <th>@_note-icon-font-color</th>
  563. // <td class="vars_value">@form-field-note-icon-font__color</td>
  564. // <td class="vars_value">@form-field-note__color</td>
  565. // <td>Field note icon color</td>
  566. // </tr>
  567. // <tr>
  568. // <th>@_note-icon-font-color-hover</th>
  569. // <td class="vars_value">@form-field-note-icon-font__color-hover</td>
  570. // <td class="vars_value">false</td>
  571. // <td>Field note icon hovered color</td>
  572. // </tr>
  573. // <tr>
  574. // <th>@_note-icon-font-color-active</th>
  575. // <td class="vars_value">@form-field-note-icon-font__color-active</td>
  576. // <td class="vars_value">false</td>
  577. // <td>Field note icon active color</td>
  578. // </tr>
  579. // <tr>
  580. // <th>@_note-icon-font-margin</th>
  581. // <td class="vars_value">@form-field-note-icon-font__margin</td>
  582. // <td class="vars_value">false</td>
  583. // <td>Field note icon margin</td>
  584. // </tr>
  585. // <tr>
  586. // <th nowrap="nowrap">@_note-icon-font-vertical-align</th>
  587. // <td class="vars_value" nowrap="nowrap">@form-field-note-icon-font__vertical-align</td>
  588. // <td class="vars_value">@icon-font__vertical-align</td>
  589. // <td>Field note icon vertical align</td>
  590. // </tr>
  591. // <tr>
  592. // <th>@_note-icon-font-position</th>
  593. // <td class="vars_value">@form-field-note-icon-font__position</td>
  594. // <td class="vars_value">@icon-font__position [before | after]</td>
  595. // <td>Field note icon position</td>
  596. // </tr>
  597. // <tr>
  598. // <th>@_note-icon-font-text-hide</th>
  599. // <td class="vars_value">@form-field-note-icon-font__text-hide</td>
  600. // <td class="vars_value">@icon-font__text-hide [true | false]</td>
  601. // <td>Field note icon text hide</td>
  602. // </tr>
  603. // </table>
  604. // </pre>
  605. //
  606. // # Required fields message customization variables
  607. //
  608. // The <code>.lib-form-hasrequired()</code> mixin variables
  609. //
  610. // <pre>
  611. // <table>
  612. // <tr>
  613. // <th class="vars_head">Mixin variable</th>
  614. // <th class="vars_head">Global variable</th>
  615. // <th class="vars_head">Default values [Allowable values]</th>
  616. // <th class="vars_head">Comment</th>
  617. // </tr>
  618. // <tr>
  619. // <th>@_position</th>
  620. // <td class="vars_value">@form-hasrequired__position</td>
  621. // <td class="vars_value">top [top | bottom]</td>
  622. // <td>Position of &quot;required fields&quot; notice</td>
  623. // </tr>
  624. // <tr>
  625. // <th>@_color</th>
  626. // <td class="vars_value">@form-hasrequired__color</td>
  627. // <td class="vars_value">@form-field-label-asterisk__color</td>
  628. // <td>Text color of &quot;required fields&quot; notice</td>
  629. // </tr>
  630. // <tr>
  631. // <th>@_font-size</th>
  632. // <td class="vars_value">@form-hasrequired__font-size</td>
  633. // <td class="vars_value">@font-size__s</td>
  634. // <td>Font size of &quot;required fields&quot; notice</td>
  635. // </tr>
  636. // <tr>
  637. // <th>@_font-family</th>
  638. // <td class="vars_value">@form-hasrequired__font-family</td>
  639. // <td class="vars_value">false</td>
  640. // <td>Font family of &quot;required fields&quot; notice</td>
  641. // </tr>
  642. // <tr>
  643. // <th>@_font-weight</th>
  644. // <td class="vars_value">@form-hasrequired__font-weight</td>
  645. // <td class="vars_value">false</td>
  646. // <td>Font weight of &quot;required fields&quot; notice</td>
  647. // </tr>
  648. // <tr>
  649. // <th>@_font-style</th>
  650. // <td class="vars_value">@form-hasrequired__font-style</td>
  651. // <td class="vars_value">false</td>
  652. // <td>Font style of &quot;required fields&quot; notice</td>
  653. // </tr>
  654. // <tr>
  655. // <th>@_line-height</th>
  656. // <td class="vars_value">@form-hasrequired__line-height</td>
  657. // <td class="vars_value">false</td>
  658. // <td>Line height of &quot;required fields&quot; notice</td>
  659. // </tr>
  660. // <tr>
  661. // <th>@_border</th>
  662. // <td class="vars_value">@form-hasrequired__border</td>
  663. // <td class="vars_value">false</td>
  664. // <td>Border of &quot;required fields&quot; notice</td>
  665. // </tr>
  666. // <tr>
  667. // <th>@_margin</th>
  668. // <td class="vars_value">@form-hasrequired__margin</td>
  669. // <td class="vars_value">@indent__s 0 0</td>
  670. // <td>Margin of &quot;required fields&quot; notice</td>
  671. // </tr>
  672. // <tr>
  673. // <th>@_padding</th>
  674. // <td class="vars_value">@form-hasrequired__padding</td>
  675. // <td class="vars_value">false</td>
  676. // <td>Padding of &quot;required fields&quot; notice</td>
  677. // </tr>
  678. // </table>
  679. // </pre>
  680. //
  681. // # Form element inputs customization
  682. //
  683. // The <code>.lib-form-element-input(@_type: *type*)</code> mixin is used to style form controls. This mixin accepts 1 mandatory parameter - the control type. This can be:
  684. // * input-text - for all input-text-like inputs
  685. // * input-radio - for radiobutton
  686. // * input-checkbox - for checkbox
  687. // * select - for select
  688. // * textarea - for textarea
  689. // ```html
  690. // <input type="password" placeholder="placeholder, type = password" />
  691. // <input type="text" placeholder="placeholder, type = text" />
  692. // <input type="url" placeholder="placeholder, type = url" />
  693. // <input type="tel" placeholder="placeholder, type = tel" />
  694. // <input type="search" placeholder="placeholder, type = search" />
  695. // <input type="number" placeholder="placeholder, type = number" />
  696. // <input type="email" placeholder="placeholder, type = email" />
  697. // <select><option>type = select</option><option>option</option></select>
  698. // <select multiple="multiple"><option>type = select multiple</option><option>option</option></select>
  699. // <textarea placeholder="placeholder, type = textarea" ></textarea>
  700. // ```
  701. input[type="text"],
  702. input[type="password"],
  703. input[type="url"],
  704. input[type="tel"],
  705. input[type="search"],
  706. input[type="number"],
  707. input[type="datetime"],
  708. input[type="email"] {
  709. .lib-form-element-input(@_type: input-text);
  710. margin-bottom: 20px;
  711. }
  712. select {
  713. .lib-form-element-input(@_type: select);
  714. margin-bottom: 20px;
  715. }
  716. select[multiple="multiple"] {
  717. .lib-css(height, auto);
  718. margin-bottom: 20px;
  719. }
  720. textarea {
  721. .lib-form-element-input(@_type: textarea);
  722. .lib-form-element-textarea-resize();
  723. }
  724. // # Form element inputs customization variables
  725. //
  726. // <pre>
  727. // <table>
  728. // <tr>
  729. // <th class="vars_head">Mixin variable</th>
  730. // <th class="vars_head">Global variable</th>
  731. // <th class="vars_head">Default value [Allowable value]</th>
  732. // <th class="vars_head">Comment</th>
  733. // </tr>
  734. // <tr>
  735. // <th>@_type</th>
  736. // <td class="vars_value">@form-element-input-type</td>
  737. // <td class="vars_value">'' [input-text | select | textarea | input-radio | input-checkbox]</td>
  738. // <td>Form control type.<br/><b>@form-element-input__[]</b> global variables are used to set up all form elements style. Control-specific global variables use these <b>@form-element-input__[]</b> variables by default. Control-specific global variables can be set up separately.<br/><b>@input-text__[]</b> is used to set up input-text controls style<br/><b>@select__[]</b> is used to set up selects style<br/><b>@textarea__[]</b> is used to set up textarea style</td>
  739. // </tr>
  740. // <tr>
  741. // <th>@_background</th>
  742. // <td class="vars_value">@form-element-input__background<br/>@input-text__background<br/>@selectbackground<br/>@textarea__background</td>
  743. // <td class="vars_value">@color-white<br/>@form-element-input__background<br/>@form-element-input__background<br/>@form-element-input__background</td>
  744. // <td>Form control background</td>
  745. // </tr>
  746. // <tr>
  747. // <th>@_border</th>
  748. // <td class="vars_value">@form-element-input__border<br/>@input-text__border<br/>@select__border<br/>@textarea__border</td>
  749. // <td class="vars_value" nowrap="nowrap">1px solid @form-element-input__border-color<br/>@form-element-input__border<br/>@form-element-input__border<br/>@form-element-input__border</td>
  750. // <td>Form control border</td>
  751. // </tr>
  752. // <tr>
  753. // <th>@_border-radius</th>
  754. // <td class="vars_value" nowrap="nowrap">@form-element-input__border-radius<br/>@input-textborder-radius<br/>@select__border-radius<br/>@textarea__border-radius</td>
  755. // <td class="vars_value">1px<br/>@form-element-input__border-radius<br/>@form-element-input__border-radius<br/>@form-element-input__border-radius</td>
  756. // <td>Form control border radius</td>
  757. // </tr>
  758. // <tr>
  759. // <th>@_height</th>
  760. // <td class="vars_value">@form-element-input__height<br/>@input-text__height<br/>@select__height<br/>@textarea__height</td>
  761. // <td class="vars_value">32px<br/>@form-element-input__height<br/>@form-element-input__height<br/>auto</td>
  762. // <td>Form control height</td>
  763. // </tr>
  764. // <tr>
  765. // <th>@_width</th>
  766. // <td class="vars_value">@form-element-input__width<br/>@input-text__width<br/>@select__width<br/>@textarea__width</td>
  767. // <td class="vars_value">100%<br/>@form-element-input__width<br/>@form-element-input__width<br/>@form-element-input__width</td>
  768. // <td>Form control width</td>
  769. // </tr>
  770. // <tr>
  771. // <th>@_margin</th>
  772. // <td class="vars_value">@form-element-input__margin<br/>@input-text__margin<br/>@select__margin<br/>@textarea__margin</td>
  773. // <td class="vars_value">false [true | false]<br/>@form-element-input__margin<br/>@form-element-input__margin<br/>0</td>
  774. // <td>Form control margin</td>
  775. // </tr>
  776. // <tr>
  777. // <th>@_padding</th>
  778. // <td class="vars_value">@form-element-input__padding<br/>@input-text__padding <br/>@select__padding<br/>@textarea__padding</td>
  779. // <td class="vars_value">0 9px<br/>@form-element-input__padding<br/>5px 10px 4px<br/>@indent__s</td>
  780. // <td>Form control padding</td>
  781. // </tr>
  782. // <tr>
  783. // <th>@_vertical-align</th>
  784. // <td class="vars_value">@form-element-input__vertical-align<br/>@input-text__vertical-align<br/>@select__vertical-align<br/>@textarea__vertical-align</td>
  785. // <td class="vars_value">baseline<br/>@form-element-input__vertical-align<br/>@form-element-input__vertical-align<br/>@form-element-input__vertical-align</td>
  786. // <td>Form control vertical align</td>
  787. // </tr>
  788. // <tr>
  789. // <th>@_background-clip</th>
  790. // <td class="vars_value">@form-element-input__background-clip<br/><br/>@input-text__background-clip<br/>@select__background-clip<br/>@textarea__background-clip</td>
  791. // <td class="vars_value">padding-box<br/>[padding-box | border-box | content-box]<br/>@form-element-input__background-clip<br/>@form-element-input__background-clip<br/>@form-element-input__background-clip</td>
  792. // <td>Form control background clip</td>
  793. // </tr>
  794. // <tr>
  795. // <th colspan="4" class="vars_section">Text settings</th>
  796. // </tr>
  797. // <tr>
  798. // <th>@_color</th>
  799. // <td class="vars_value">@form-element-input__color<br/>@input-text__color<br/>@select__color<br/>@textarea__color</td>
  800. // <td class="vars_value">false<br/>@form-element-input__color<br/>@form-element-input__color<br/>@form-element-input__color</td>
  801. // <td>Form control text color</td>
  802. // </tr>
  803. // <tr>
  804. // <th>@_font-size</th>
  805. // <td class="vars_value">@form-element-input__font-size<br/>@input-text__font-size<br/>@select__font-size<br/>@textarea__font-size</td>
  806. // <td class="vars_value">@font-size__base<br/>@form-element-input__font-size<br/>@form-element-input__font-size<br/>@form-element-input__font-size</td>
  807. // <td>Form control font size</td>
  808. // </tr>
  809. // <tr>
  810. // <th>@_font-family</th>
  811. // <td class="vars_value">@form-element-input__font-family<br/>@input-text__font-family<br/>@select__font-family<br/>@textarea__font-family</td>
  812. // <td class="vars_value">@font-family__base<br/>@form-element-input__font-family<br/>@form-element-input__font-family<br/>@form-element-input__font-family</td>
  813. // <td>Form control font family</td>
  814. // </tr>
  815. // <tr>
  816. // <th>@_font-weight</th>
  817. // <td class="vars_value">@form-element-input__font-weight<br/>@input-text__font-weight<br/>@select__font-weight<br/>@textarea__font-weight</td>
  818. // <td class="vars_value">false<br/>@form-element-input__font-weight<br/>@form-element-input__font-weight<br/>@form-element-input__font-weight</td>
  819. // <td>Form control font weight</td>
  820. // </tr>
  821. // <tr>
  822. // <th>@_font-style</th>
  823. // <td class="vars_value">@form-element-input__font-style<br/>@input-text__font-style<br/>@selectfont-style<br/>@textarea__font-style</td>
  824. // <td class="vars_value">false<br/>@form-element-input__font-style<br/>@form-element-input__font-style<br/>@form-element-input__font-style</td>
  825. // <td>Form control font style</td>
  826. // </tr>
  827. // <tr>
  828. // <th>@_line-height</th>
  829. // <td class="vars_value">@form-element-input__line-height<br/>@input-text__line-height<br/>@select__line-height<br/>@textarea__line-height</td>
  830. // <td class="vars_value">@line-height__base<br/>@form-element-input__line-height<br/>@form-element-input__line-height<br/>@form-element-input__line-height</td>
  831. // <td>Form control line height</td>
  832. // </tr>
  833. // <tr>
  834. // <th colspan="4" class="vars_section">Placeholder</th>
  835. // </tr>
  836. // <tr>
  837. // <th>@_placeholder-color</th>
  838. // <td class="vars_value">@form-element-input-placeholder__color<br/>@input-text-placeholder__color<br/>@select-placeholder__color<br/>@textarea-placeholder__color</td>
  839. // <td class="vars_value">#c2c2c2<br/>@form-element-input-placeholder__color<br/>@form-element-input-placeholder__color<br/>@form-element-input-placeholder__color</td>
  840. // <td>Form control placeholder color</td>
  841. // </tr>
  842. // <tr>
  843. // <th nowrap>@_placeholder-font-style</th>
  844. // <td class="vars_value" nowrap="nowrap">@form-element-input-placeholder__font-style<br/>@inputtext-placeholder-font-style<br/>@select-placeholder__font-style<br/>@textarea-placeholder__font-style</td>
  845. // <td class="vars_value">@form-element-input__font-style<br/>@form-element-input-placeholder__font-style<br/>@form-element-input-placeholder__font-style<br/>@form-element-input-placeholder__font-style</td>
  846. // <td>Form control placeholder font style</td>
  847. // </tr>
  848. // <tr>
  849. // <th colspan="4" class="vars_section">Disabled element</th>
  850. // </tr>
  851. // <tr>
  852. // <th>@_disabled-background</th>
  853. // <td class="vars_value" nowrap="nowrap">@form-element-input__disabled__background<br/>@inputtextdisabled-background<br/>@select__disabled__background<br/>@textarea__disabled__background</td>
  854. // <td class="vars_value">@form-element-input__background<br/>@form-element-input__disabled__background<br/>@form-element-input__disabled__background<br/>@form-element-input__disabled__background</td>
  855. // <td>Disabled form element background</td>
  856. // </tr>
  857. // <tr>
  858. // <th>@_disabled-border</th>
  859. // <td class="vars_value">@form-element-input__disabled__border<br/>@input-text__disabled__border<br/>@select__disabled__border<br/>@textarea__disabled__border</td>
  860. // <td class="vars_value">@form-element-input__border<br/>@form-element-input__disabled__border<br/>@form-element-input__disabled__border<br/>@form-element-input__disabled__border</td>
  861. // <td>Disabled form element border</td>
  862. // </tr>
  863. // <tr>
  864. // <th>@_disabled-opacity</th>
  865. // <td class="vars_value">@form-element-input__disabled__opacity<br/>@input-text__disabled__opacity<br/>@select__disabled__opacity<br/>@textarea__disabled__opacity</td>
  866. // <td class="vars_value">.5<br/>@form-element-input__disabled__opacity<br/>@form-element-input__disabled__opacity<br/>@form-element-input__disabled__opacity</td>
  867. // <td>Disabled form element opacity</td>
  868. // </tr>
  869. // <tr>
  870. // <th>@_disabled-color</th>
  871. // <td class="vars_value">@form-element-input__disabled__color<br/>@input-text__disabled__color<br/>@select__disabled__color<br/>@textarea__disabled__color</td>
  872. // <td class="vars_value">@form-element-input__color<br/>@form-element-input__disabled__color<br/>@form-element-input__disabled__color<br/>@form-element-input__disabled__color</td>
  873. // <td>Disabled form element text color</td>
  874. // </tr>
  875. // <tr>
  876. // <th nowrap="nowrap">@_disabled-font-style</th>
  877. // <td class="vars_value">@form-element-input__disabled__font-style<br/>@input-text__disabled__font-style<br/>@select__disabled__font-style<br/>@textarea__disabled__font-style</td>
  878. // <td class="vars_value">@form-element-input__font-style<br/>@form-element-input__disabled__font-style<br/>@form-element-input__disabled__font-style<br/>@form-element-input__disabled__font-style</td>
  879. // <td>Disabled form element font style</td>
  880. // </tr>
  881. // <tr>
  882. // <th colspan="4" class="vars_section">Focused elements</th>
  883. // </tr>
  884. // <tr>
  885. // <th>@_focus-background</th>
  886. // <td class="vars_value">@form-element-input__focus__background<br/>@input-text__focus__background<br/>@select__focus__background<br/>@textarea__focus__background</td>
  887. // <td class="vars_value">@form-element-input__background<br/>@form-element-input__focus__background<br/>@form-element-input__focus__background<br/>@form-element-input__focus__background</td>
  888. // <td>Focused form element background</td>
  889. // </tr>
  890. // <tr>
  891. // <th>@_focus-border</th>
  892. // <td class="vars_value">@form-element-input__focus__border<br/>@input-text__focus__border<br/>@select__focus__border<br/>@textarea__focus__border</td>
  893. // <td class="vars_value">@form-element-input__border<br/>@form-element-input__focus__border<br/>@form-element-input__focus__border<br/>@form-element-input__focus__border</td>
  894. // <td>Focused form element border</td>
  895. // </tr>
  896. // <tr>
  897. // <th>@_focus-color</th>
  898. // <td class="vars_value">@form-element-input__focus__color<br/>@input-text__focus__color<br/>@select__focus__color<br/>@textarea__focus__color</td>
  899. // <td class="vars_value">@form-element-input__color<br/>@form-element-input__focus__color<br/>@form-element-input__focus__color<br/>@form-element-input__focus__color</td>
  900. // <td>Focused form element color</td>
  901. // </tr>
  902. // <tr>
  903. // <th>@_focus-font-style</th>
  904. // <td class="vars_value">@form-element-input__focus__font-style<br/>@input-text__focus__font-style<br/>@select__focus__font-style<br/>@textarea__focus__font-style</td>
  905. // <td class="vars_value">@form-element-input__font-style<br/>@form-element-input__focus__font-style<br/>@form-element-input__focus__font-style<br/>@form-element-input__focus__font-style</td>
  906. // <td>Focused form element font style</td>
  907. // </tr>
  908. // </table>
  909. // </pre>
  910. // # Form element choice
  911. // The <code>.lib-form-element-choise()</code> mixin is used to customize checkboxes and radio buttons.
  912. // ```html
  913. // <input type="checkbox" name="checkbox-example" /><label for="checkbox-example">Label for checkbox</label><br />
  914. // <input type="radio" name="radio-example" /><label for="radio-example">Label for radio button</label>
  915. // ```
  916. input[type="checkbox"] {
  917. .lib-form-element-choice(@_type: input-checkbox);
  918. }
  919. input[type="radio"] {
  920. .lib-form-element-choice(@_type: input-radio);
  921. }
  922. // # Form element choice variables
  923. //
  924. // <pre>
  925. // <table>
  926. // <tr>
  927. // <th class="vars_head">Mixin variable</th>
  928. // <th class="vars_head">Global variable</th>
  929. // <th class="vars_head">Default values [Allowable values]</th>
  930. // <th class="vars_head">Comment</th>
  931. // </tr>
  932. // <tr>
  933. // <th>@_type</th>
  934. // <td class="vars_value">@form-element-choice__type</td>
  935. // <td class="vars_value">'' ['' | radio | checkbox]</td>
  936. // <td>Choice element type</td>
  937. // </tr>
  938. // <tr>
  939. // <th>@_vertical-align</th>
  940. // <td class="vars_value">@form-element-choice__vertical-align<br>@input-radio__vertical-align<br>@input-checkbox__vertical-align</td>
  941. // <td class="vars_value">false<br/>@form-element-choice__vertical-align<br/>@form-element-choice__vertical-align</td>
  942. // <td>Choice element vertical align</td>
  943. // </tr>
  944. // <tr>
  945. // <th>@_margin</th>
  946. // <td class="vars_value">@form-element-choice__margin<br>@input-radio__margin<br>@input-checkbox__margin</td>
  947. // <td class="vars_value">2px @indent__xs 0 0<br/>@form-element-choice__margin<br/>@form-element-choice__margin</td>
  948. // <td>Choice element margin</td>
  949. // </tr>
  950. // <tr>
  951. // <th>@_disabled-opacity</th>
  952. // <td class="vars_value">@form-element-choice__disabled__opacity<br>@input-radio__disabled__opacity<br>@input-checkbox__disabled__opacity</td>
  953. // <td class="vars_value">@form-element-input__disabled__opacity<br/>@form-element-choice__disabled__opacity<br/>@form-element-choice__disabled__opacity</td>
  954. // <td>Disabled choice element opacity</td>
  955. // </tr>
  956. // </table>
  957. // </pre>
  958. // # Custom color
  959. // The <code>.lib-form-element-color()</code> mixin is used to set form elements background and color.
  960. // ```css
  961. // @_border-color: ''
  962. // @_background: ''
  963. // @_color: ''
  964. // @_focus-border-color: ''
  965. // @_focus-background: ''
  966. // @_focus-color: ''
  967. // @_disabled-border-color: ''
  968. // @_disabled-background: ''
  969. // @_disabled-color: ''
  970. // @_placeholder-color: ''
  971. // ```
  972. // ```html
  973. // <input type="text" class="text text-example-1" placeholder="placeholder, type = text" /><br /><br />
  974. // <input type="text" class="text text-example-1" placeholder="placeholder, type = text, disabled" disabled="disabled" /><br /><br />
  975. // <select class="select-example-1"><option>type = select</option><option>option</option></select><br /><br />
  976. // <textarea class="textarea-example-1" placeholder="placeholder, type = textarea"></textarea>
  977. // ```
  978. input.text-example-1,
  979. select.select-example-1,
  980. textarea.textarea-example-1 {
  981. .lib-form-element-color(
  982. @_background: #fdf0d5,
  983. @_border-color: #fc0,
  984. @_color: #b30000,
  985. @_focus-color: #060,
  986. @_focus-border-color: #cff,
  987. @_disabled-color: #fcc
  988. );
  989. }
  990. input.text-example-1,
  991. textarea.textarea-example-1 {
  992. .lib-form-element-color(
  993. @_placeholder-color: #ccc
  994. );
  995. }
  996. // # Input number - input-text view
  997. // ```html
  998. // <input type="number" class="number number-example" placeholder="placeholder, type = number " />
  999. // ```
  1000. .number-example {
  1001. .lib-form-element-number-reset();
  1002. }
  1003. // # Input search - input-text view
  1004. // ```html
  1005. // <input type="search" class="search search-example" placeholder="placeholder, type = search " />
  1006. // ```
  1007. .search-example {
  1008. .lib-form-element-search-reset();
  1009. }
  1010. // # Form validation
  1011. //
  1012. // The <code>.lib-form-validation-note()</code> mixin is used to customize form validation error messages.
  1013. //
  1014. // ```html
  1015. // <input type="text" class="textarea-example-4 mage-error" placeholder="placeholder, type = text" />
  1016. // <div class="mage-error">This is a required field.</div>
  1017. // <br />
  1018. // <input type="text" class="textarea-example-5 valid" placeholder="placeholder, type = text" />
  1019. //
  1020. // <br /><br />
  1021. // <select class="select-example-4 mage-error"><option>type = select</option><option>option</option></select>
  1022. // <div class="mage-error">This is a required field.</div>
  1023. // <br />
  1024. // <select class="select-example-5 valid"><option>type = select</option><option>option</option></select>
  1025. //
  1026. // <br /><br />
  1027. // <textarea class="textarea-example-4 mage-error" placeholder="placeholder, type = textarea"></textarea>
  1028. // <div class="mage-error">This is a required field.</div>
  1029. // <br />
  1030. // <textarea class="textarea-example-5 valid" placeholder="placeholder, type = textarea"></textarea>
  1031. //
  1032. // <br /><br />
  1033. // <input type="checkbox" name="checkbox-example-1" class="checkbox-example-2 mage-error" />
  1034. // <div class="mage-error">This is a required field.</div>
  1035. //
  1036. // <br /><br />
  1037. // <input type="radio" name="radio-example-1" class="radio-example-2 mage-error" />
  1038. // <div class="mage-error">This is a required field.</div>
  1039. // ```
  1040. input,
  1041. textarea,
  1042. select {
  1043. .lib-form-validation-note();
  1044. }
  1045. // # Form validation variables
  1046. // <pre>
  1047. // <table>
  1048. // <tr>
  1049. // <th class="vars_head">Mixin variable</th>
  1050. // <th class="vars_head">Global variable</th>
  1051. // <th class="vars_head">Default values [Allowable values]</th>
  1052. // <th class="vars_head">Comment</th>
  1053. // </tr>
  1054. // <tr>
  1055. // <th>@_note-color</th>
  1056. // <td class="vars_value">@form-validation-note__color-error</td>
  1057. // <td class="vars_value">@error__color</td>
  1058. // <td>Validation note text color</td>
  1059. // </tr>
  1060. // <tr>
  1061. // <th>@_note-font-size</th>
  1062. // <td class="vars_value">@form-validation-note__font-size</td>
  1063. // <td class="vars_value">@font-size__s</td>
  1064. // <td>Validation note font size</td>
  1065. // </tr>
  1066. // <tr>
  1067. // <th>@_note-font-family</th>
  1068. // <td class="vars_value">@form-validation-note__font-family</td>
  1069. // <td class="vars_value">false</td>
  1070. // <td>Validation note font family</td>
  1071. // </tr>
  1072. // <tr>
  1073. // <th>@_note-font-style</th>
  1074. // <td class="vars_value">@form-validation-note__font-style</td>
  1075. // <td class="vars_value">false</td>
  1076. // <td>Validation note font style</td>
  1077. // </tr>
  1078. // <tr>
  1079. // <th>@_note-font-weight</th>
  1080. // <td class="vars_value">@form-validation-note__font-weight</td>
  1081. // <td class="vars_value">false</td>
  1082. // <td>Validation note font weight</td>
  1083. // </tr>
  1084. // <tr>
  1085. // <th>@_note-line-height</th>
  1086. // <td class="vars_value">@form-validation-note__line-height</td>
  1087. // <td class="vars_value">false</td>
  1088. // <td>Validation note line height</td>
  1089. // </tr>
  1090. // <tr>
  1091. // <th>@_note-margin</th>
  1092. // <td class="vars_value">@form-validation-note__margin</td>
  1093. // <td class="vars_value">3px 0 0</td>
  1094. // <td>Validation note margin</td>
  1095. // </tr>
  1096. // <tr>
  1097. // <th>@_note-padding</th>
  1098. // <td class="vars_value">@form-validation-note__padding</td>
  1099. // <td class="vars_value">false</td>
  1100. // <td>Validation note padding</td>
  1101. // </tr>
  1102. // <tr>
  1103. // <th>@_note-icon-use</th>
  1104. // <td class="vars_value">@form-validation-note-icon__use</td>
  1105. // <td class="vars_value">false [true | false]</td>
  1106. // <td>Show validation note icon</td>
  1107. // </tr>
  1108. // <tr>
  1109. // <th>@_note-icon-font-content</th>
  1110. // <td class="vars_value">@form-validation-note-icon__font-content</td>
  1111. // <td class="vars_value">@icon-pointer-up</td>
  1112. // <td>Validation note icon code</td>
  1113. // </tr>
  1114. // <tr>
  1115. // <th>@_note-icon-font</th>
  1116. // <td class="vars_value">@form-validation-note-icon__font</td>
  1117. // <td class="vars_value">@icon-font</td>
  1118. // <td>Validation note icon font</td>
  1119. // </tr>
  1120. // <tr>
  1121. // <th>@_note-icon-font-size</th>
  1122. // <td class="vars_value">@form-validation-note-icon__font-size</td>
  1123. // <td class="vars_value">@form-validation-note__font-size * 2</td>
  1124. // <td>Validation note icon font size</td>
  1125. // </tr>
  1126. // <tr>
  1127. // <th>@_note-icon-font-line-height</th>
  1128. // <td class="vars_value">@form-validation-note-icon__font-line-height</td>
  1129. // <td class="vars_value">@form-validation-note__font-size</td>
  1130. // <td>Validation note icon line height</td>
  1131. // </tr>
  1132. // <tr>
  1133. // <th>@_note-icon-font-color</th>
  1134. // <td class="vars_value">@form-validation-note-icon__font-color</td>
  1135. // <td class="vars_value">@form-validation-note__color-error</td>
  1136. // <td>Validation note icon color</td>
  1137. // </tr>
  1138. // <tr>
  1139. // <th>@_note-icon-font-color-hover</th>
  1140. // <td class="vars_value">@form-validation-note-icon__font-color-hover</td>
  1141. // <td class="vars_value">false</td>
  1142. // <td>Hovered validation note icon color</td>
  1143. // </tr>
  1144. // <tr>
  1145. // <th>@_note-icon-font-color-active</th>
  1146. // <td class="vars_value">@form-validation-note-icon__font-color-active</td>
  1147. // <td class="vars_value">false</td>
  1148. // <td>Active validation note icon color</td>
  1149. // </tr>
  1150. // <tr>
  1151. // <th>@_note-icon-font-margin</th>
  1152. // <td class="vars_value">@form-validation-note-icon__font-margin</td>
  1153. // <td class="vars_value">false</td>
  1154. // <td>Validation note icon margin</td>
  1155. // </tr>
  1156. // <tr>
  1157. // <th>@_note-icon-font-vertical-align</th>
  1158. // <td class="vars_value">@form-validation-note-icon__font-vertical-align</td>
  1159. // <td class="vars_value">@icon-font__vertical-align</td>
  1160. // <td>Validation note icon vertical align</td>
  1161. // </tr>
  1162. // <tr>
  1163. // <th>@_note-icon-font-position</th>
  1164. // <td class="vars_value">@form-validation-note-icon__font-position</td>
  1165. // <td class="vars_value">@icon-font__position</td>
  1166. // <td>Validation note icon position</td>
  1167. // </tr>
  1168. // <tr>
  1169. // <th>@_note-icon-font-text-hide</th>
  1170. // <td class="vars_value">@form-validation-note-icon__font-text-hide</td>
  1171. // <td class="vars_value">@icon-font__text-hide</td>
  1172. // <td>Validation note icon text hide</td>
  1173. // </tr>
  1174. // </table>
  1175. // </pre>