i-flex
class, although
in-flex
and flex
can also be applied. Other special
classes included flex-full
, flex-btn
,
i-flex-btn
and flex-child
classes.
i-flex
- sets input field up with flex properitesi-flex-full
- sets input field up with flex properites at 100% width flex-btn
- used on form buttons flex-full
- applied on any form fieldflex
display type, utility classes
like f-row
(or flex-row
) and f-col
(or flex-col
)
can be applied on them. The example below defines how to set up a form input field using these predefined
classes.
<input type="text" class="i-flex" placeholder="firstname">
<input type="text" class="i-flex-full" placeholder="firstname">
input
field's height above can be increased by setting a padding on the input
field itself just as shown below:
<input type="text" class="i-flex-full pxv-10" placeholder="firstname">
<div class="i-flex-full bc-white pxv-10"> <input type="text" class="i-flex-full bc-white bco-10" placeholder="firstname"> <br><br> </div>
input
in a div
with class i-flex
or i-flex-full
, we have been able to control the side margins. Also, in order to achieve this, the input
was defined with a transparent white background while the parent div
was given the desired background color. This means that
our input can inherit its background color from the parent element. Aside from background colors and margins, wrapping our input
elements in a div is the most ideal way to set up the form inputs using the predefined classes.
<div class="i-flex-full bc-white"> <span class="flex-ico bc-silver pxs-10"> <span class="ico-envelope"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="email@example.com"> </div>
flex-ico
). Since the input
exists at an 100% width, we can
shift our icon to the right side of the input item and this will still work fine. This is show below: <div class="i-flex-full"> <input type="text" class="i-flex-full bc-white bco-10" placeholder="email@example.com"> <span class="flex-ico bc-silver pxs-10"> <span class="ico-envelope"></span> </span> </div>
div
was given a left padding to push the input button a bit towards right side. Without applying
the left padding, the input
may look closer to the left than usual.
<div class="i-flex-full-in rad-r bc-white"> <span class="flex-ico bc-silver pxs-10"> <span class="ico-envelope"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="email@example.com"> </div>
i-flex-full-in
property.
When the i-flex-in
or i-flex-full-in
utitily classes are applied to elements, aside
from setting the element's display property as flex
, it also extends to setting the property of
overflow:hidden
on the element. In most times, when we have an overflowing flex child, it is better to use
the i-flex-in
or i-flex-full-in
classes or we could just add the
flow-hide
property to keep our content within the parent element.
form-field
is applied on the form input's
direct parent element, the css library will understand that each form field is expected to have a vertical spacing just as below:
<div class="i-flex-full-in bc-white shadow-1"> <span class="flex-ico bc-silver pxs-12"> <span class="ico-envelope"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="email@example.com"> <br><br> </div> <div class="i-flex-full-in bc-white shadow-1"> <span class="flex-ico bc-silver pxs-12"> <span class="ico-plane"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="address"> <br><br> </div>
<div class="i-flex-full-in bc-white shadow-1"> <span class="flex-ico bc-silver pxs-12"> <span class="ico-envelope"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="email@example.com"> <br><br> </div> <div class="i-flex-full-in bc-white shadow-1"> <span class="flex-ico bc-silver pxs-12"> <span class="ico-plane"></span> </span> <input type="text" class="i-flex-full bc-white bco-10" placeholder="address"> <br><br> </div>
sp-d5
, sp-d7
or sp-1
classes with sp-1
being the highest number of vertical spaces we can
add for form input fields.
data-anime="place"
attribute along with a data-cast
and data-rule
attribute. The data-cast
is used to define the behaviour of the placeholder text with options
like "fade"
, "up-fade"
, "up-fill"
, "up-stick"
, "up-wait"
and "up-shrink"
.
However, the data-rule
attriube is an attribute that determines a bottom line animation. The input forms below are samples of these
animations.
data-cast
option of as "fade"
. The code sample is shown below:
<div class="i-flex rad-r bc-white midv font-em-1d1"> <div class="rad-r" data-anime="place" data-cast="fade"> <input id="anime-1" type="text" name="username" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-1">Animation 1</label> </div> </div>
<div class="i-flex rad-r bc-white midv font-em-1d1"> <div class="rad-r" data-anime="place" data-cast="up-fade"> <input id="anime-2" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-2">Animation 2</label> </div> </div>
<div class="i-flex anime-place loaded"> <label for="anime-3" class="place">Animation 3</label> <input id="anime-3" type="text" class="i-flex-full pxv-6" placeholder="Animation 3"> </div>
<div class="i-flex anime-place loaded"> <label for="anime-4" class="place">Animation 4</label> <input id="anime-4" type="text" class="i-flex-full pxv-6" placeholder=" "> </div>
<div class="i-flex anime-place loaded"> <label for="anime-5" class="place">Animation 5</label> <input id="anime-5" type="text" class="i-flex-full pxv-6" placeholder=" "> </div>
padd
attribute to adjust the passing
with a value of "soft"
, "fair"
or "hard"
. The default value is "fair"
.
This is shown below:
<div class="i-flex rad-r bc-white midv font-em-1d1"> <div class="rad-r" data-anime="place" data-cast="up-stick" data-shrink="" padd="hard"> <input id="anime-7" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-7">Animation 7</label> </div> </div>
data-rule
as shown below:
<div class="i-flex bc-white midv font-em-1d1"> <div class="" data-anime="place" data-cast="up-stick" data-shrink="" data-rule padd="soft"> <input id="anime-8" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-8">Animation 8</label> </div> </div>
overflow:hidden
style. This can be done through the i-flex-in
class. Also, the border radius must be applied on both the parent element and the element with the
data-anime
attribute. The overflow hidden property will prevent the animated text from sticking up.
In this situation, the data-cast="fade"
is the best option to use. The animation and code structure is shown below:
data-rule
as shown below:
<div class="i-flex-in rad-r bc-white midv font-em-1d1"> <div class="rad-r" data-anime="place" data-cast="fade" padd="soft"> <input id="anime-9" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-9">Animation 9</label> <div line=""></div> </div> </div>
data-rule
as "line"
an to add an extra line field that can be styled with colors
as shown below:
<div class="i-flex-in rad-r bc-white midv font-em-1d1"> <div class="rad-r" data-anime="place" data-cast="fade" data-rule="line" padd="soft"> <input id="anime-9" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-9">Animation 10</label> <div line="" class="c-red"></div> </div> </div>
flex-ico
attribute as shown above. The format is shown below:
<div class="i-flex-in bd-f rad-r bc-white font-em-1d1"> <span class="flex-ico bi-chat-dots bc-orange c-white"></span> <div class="rad-r" data-anime="place" data-cast="fade" data-rule="line" padd="soft"> <input id="anime-11" type="text" class="flex-full bc-white rad-i bco-8 c-i" placeholder=" "> <label for="anime-11">Animation 11</label> <span line class="c-orange"></span> </div> </div>