Petalicons

petalicon.less

shakr
align-center
align-left
align-right
align-text-center
align-text-justify
align-text-left
align-text-right
arrow-back
arrow-down
arrow-down-up
arrow-forward
arrow-horizontal
arrow-left
arrow-left-right
arrow-right
arrow-up
arrow-vertical
bell
brand
brush
bullhorn
calendar
camera
car
cart
check
check-round
check-round-filled
checklist
chevron-down
chevron-left
chevron-right
chevron-small-bottom
chevron-small-down
chevron-small-left
chevron-small-right
chevron-small-up
chevron-up
circle
clock
cloud
cloud-check
cloud-cross
cloud-upload
code
cog
collection
comment
comments
config
coupon
credit-card
crop
cross
cross-round
cross-round-filled
currency-dollar
currency-won
currency-yen
customer-support
dashboard
device-desktop
device-laptop
device-mobile
device-tablet
device-tv
document
dollar-round
door
download
draggable
draggable-horizontal
draggable-vertical
edit-text
ellipsis
ellipsis-vertical
embed
exclamation
expand
eye
eye-closed
file
file-copy
file-paste
filter
fit-horizontal
fit-vertical
flash
folder
font
globe
graph
heart
heart-outline
help
home
import
info
item-photo
item-text
item-video
key
link
link-round
list
location
lock-locked
lock-unlocked
mail
minus
minus-round
music
new
not-allowed
notice
outlink
palette
pencil
phone
photo
placeholder-add
play
play-back
play-ff
play-pause
play-round
play-rw
play-skip-next
play-skip-prev
play-stop
plus
plus-round
publish
refresh
repeat
replace
rotate
rotate-ccw
rotate-cw
save
scissor
search
send
sfx
share
share-alt
shrink
spinner
stack
star
star-outline
statistics
statistics-alt
stopwatch
tag
text
tile
tools
translate
translate-alt
trash
triangle-down
triangle-left
triangle-right
triangle-up
triangle-up-down
undo
upload
upload-alt
user
user-round
users
video
video-editor
video-player
volume-0
volume-1
volume-2
volume-3
volume-mute
warning
zoomin
zoomout

Petalicons is an icon set with over 130 original icons included in Petal. All icons are in vector SVG format packed into one font file.


Inserting icons directly in HTML

First use the .petalicon class to load the basic style for the icon element, then write the class name for the actual icon, like example below:

<i class="petalicon petalicon-zoomin"></i>
<i class="petalicon petalicon-zoomout"></i>

Although the petalicon classes are not bound to <i> tags, but it's recommended you use a unique separate element for the icons to avoid collision. The icons use the :before pseudo-element to insert unicode characters that are replaced by the glyphs in the icon font.

The icons require external icon font files to be loaded properly, so make sure the file path set by the @petalicon-file-path variable in the petal.less file is valid.


Inserting icons in stylesheets

You can also insert icons through stylesheets as LESS mixin classes inside your project stylesheet. You can only use this method if you're including Petal source less files in your project's stylesheet build.

<!-- HTML code -->
<div class="lock-state-indicator locked">
    <span class="icon"></span>
    <span class="text-label">Locked</span>
</div>
// LESS code
.lock-state-indicator {
    &.unlocked {
        .icon:before {
            .petalicon;
            .petalicon-lock-unlocked;
        }
    }

    &.locked {
        .icon:before {
            .petalicon;
            .petalicon-lock-locked;
        }
    }
}

Make sure you're calling the mixins inside a :before (or :after) pseudo element.


Managing icon size and alignment

The icons are are all designed on a 16px grid and fine-tuned to match the pixel grid. The .petalicon class strictly defines the icons as 16px size by default to ensure icons stay sharp at small sizes. In cases you want to resize icons, you must target the .petalicon:before pseudo element and manually override font-size property.

If you want to simply double the icon size to 32px, use the optional class .x2. You can also call it as a LESS mixin by writing .petalicon.x2();.

Default size (16px)
2x size (32px)

When aligning icons with text vertically, use vertical-align: middle appropriately.