Skip to content
PolyFish CSS

Migrating to 0.20

Class by class from Bootstrap, Tailwind and earlier PolyFish releases, and what has no equivalent.

Documentation menu

01 / 01

Migrating

Coming from Bootstrap, Tailwind or a classless framework: what maps onto what, what deliberately has no equivalent, and an order of work that does not stall halfway.

Coming from another framework, most of the work is unlearning rather than learning. The tables below map what you already know onto what exists here, and name the places where there is deliberately no equivalent.

From Bootstrap

BootstrapPolyFishNote
.container.pf-page-containerOne measure, 987px, plus --narrow
.row / .col-md-6.pf-space-grid.pf-space-grid--2, or .pf-page-sidebar for unequal halvesThe twelve-column system was removed in 0.20 — the primitives carry their own thresholds
.btn .btn-primary.pf-ctrl-btnPrimary is the default; --secondary, --ghost for the rest
.card / .card-body.pf-content-card / .pf-content-card-bodyAlso --numbered, --media, --facet
.alert-warning.pf-content-alert.pf-content-alert--warn--inline for a one-liner
.table-striped.pf-content-table--zebraWrap in .pf-content-table-wrap
.badge.pf-comp-badge--dot for status
.d-flex .gap-3.pf-space-clusterWrapping row with a shared gap
.modal + JS<dialog class="pf-comp-dialog">Opens from markup with invoker commands
data-bs-toggle="tab".pf-comp-tabs with radiosWorks with no script; the optional script adds ARIA
Sass variablesCustom propertiesChange at runtime, no rebuild

No equivalent, on purpose: a carousel, a JavaScript grid system, utility classes for every property, and jQuery-era data attributes for behaviour the platform now does itself.

From Tailwind

The mental shift is larger. Tailwind composes a component out of dozens of atoms in the markup; here a component is one class and the atoms exist only for the gaps between components.

TailwindPolyFish
flex flex-col gap-4.pf-space-stack
flex flex-wrap items-center gap-2.pf-space-cluster
grid grid-cols-3 gap-6.pf-space-grid.pf-space-grid--3
mx-auto max-w-5xl px-4.pf-page-container
rounded-lg border bg-white/5 p-6.pf-content-card
hover:bg-emerald-500.pf-fx-hover-bg-accent (Variants)
dark:text-whiteRoles flip with the scheme; no per-class variant needed
@applyWrite the rule. There is no build step to apply into
tailwind.config.js:root custom properties

What you gain: no compiler, no purge step, markup you can read aloud, and a theme that changes at runtime. What you give up: the enormous atomic vocabulary. If you want a utility for every property, keep Tailwind — that is a real preference, not a mistake.

From Pico or another classless framework

Load PolyFishCSS-Classless.css and your existing semantic HTML gets styled with no classes at all. It sits in the lowest layer, so the moment you add a pf- class, that class wins. That makes the migration incremental: start classless, add components where you need more than the defaults.

A migration that does not stall

  1. Load PolyFish after your current framework

    Both will fight for a while. Keep your old stylesheet last so nothing breaks visually on day one.

  2. Move the tokens first

    Map your brand colours onto --pf-accent, --pf-bg and --pf-text. The whole framework follows immediately.

  3. Convert page furniture next

    Header, footer, containers and sections. These are the least risky and the most visible.

  4. Then components, page by page

    Cards, tables, forms. Delete the old classes as you go rather than leaving both.

  5. Drop the old stylesheet and measure

    Check contrast and check the page at 320px. Both are where migrations leave debris.

Renamed since you last looked

Pre-1.0, a minor release may rename or remove things. Every change is listed here with its replacement, and the class reference always lists the current name. Renames from 0.16 and 0.17 are in the token table.

Renamed in 0.20

Six classes renamed to the rule the rest of the framework follows, before the API freezes for 1.0.

WasUseWhy
.pf-none.pf-hiddenBase of the pf-md-hidden/pf-lg-hidden family.
.pf-hide-sm.pf-hide-mobileHides below the 860px nav breakpoint, not the sm tier its name implied.
.pf-hide-lg.pf-hide-desktopSame, above it.
.pf-display.pf-font-displayA font-family utility named like a display utility. Now matches --pf-font-display.
.pf-mono.pf-font-monoMatches --pf-font-mono.
.pf-bordered-accent.pf-bordered-strongIt always set --pf-border-strong; the name lied.

Removed in 0.20

The aliases file is gone, so these need an edit rather than a compatibility link. Every removal has a one-for-one replacement except where the note says otherwise.

WasUseNote
PolyFishCSS-Compat.css—The alias file for the 0.16 and 0.17 renames. Rename to the current names instead; the tables above list them.
.pf-w-1-2, -1-3, -2-3, -1-4, -3-4, -1-5 ….pf-w-50, .pf-w-35, .pf-w-65, .pf-w-25, .pf-w-75, .pf-w-20Two names for one width. The percentage scale stays.
.pf-w-100, .pf-w-half.pf-w-full, .pf-w-50Same.
.pf-md-gap-*, .pf-lg-gap-* and the -px steps.pf-gap-*A gap that changes at a breakpoint is what the layout primitives already do intrinsically.
.pf-basis-*, .pf-flex-auto, .pf-flex-initial, .pf-flex-none, .pf-grow-0/1, .pf-shrink-1.pf-space-grow, .pf-grow, .pf-shrink-0Six ways to say three things.
.pf-span-1..6, .pf-row-span-2, .pf-place-*.pf-space-span, .pf-space-grid--2/3/4, .pf-items-* with .pf-justify-*Remains of the grid system.
Responsive alignment, order, width and text mirrors (.pf-md-items-center, .pf-lg-order-last …)The base utility, or a container query22 classes. Responsive visibility and display stay: .pf-md-hidden, .pf-md-block, .pf-md-flex, .pf-md-grid-d.
Transform utilities: .pf-translate-*, .pf-rotate-*, .pf-scale-*, .pf-flip-x, .pf-origin-*, .pf-transformA transform in your own stylesheetA static transform is one declaration and is almost always part of a component, not a page-level helper.
Filters: .pf-blur*, .pf-grayscale, .pf-saturate, .pf-desaturate, .pf-bright, .pf-dim, .pf-backdrop-blur*, .pf-filter-none.pf-fx-frost, or your own filter.pf-fx-frost is the one that needed the fallback work; the rest are a single declaration.
.pf-ring-1, .pf-ring-2, .pf-ring-accent, .pf-ring-danger, .pf-ring-offset.pf-ring, .pf-fx-focus-ringThe ring section duplicated the ring utility.
Transition and timing extras: .pf-duration-*, .pf-delay-*, .pf-ease-*, .pf-transition-opacity/shadow/transform, .pf-will-change-*.pf-transition, .pf-transition-colors, and the motion tokensThe tokens (--pf-ease-out, --pf-duration-2) remain and are the supported way to time your own transitions.
Scroll snap: .pf-snap-*Your own scroll-snap-typeNothing on the site used them and snap needs per-case tuning.
.pf-blend-*, .pf-resize-*, .pf-appearance-none, .pf-caret-accent, .pf-comp-list-disc, .pf-comp-list-decimal, .pf-fade-bottom, .pf-fade-right, .pf-fx-animate-bounce, .pf-fx-animate-slide-in, .pf-fx-group-hide, .pf-focus-border, .pf-fx-hover-border, .pf-fx-hover-bright, .pf-max-w-noneYour own declaration, or the nearest kept helperOne-declaration helpers nothing reached for.
Variant cross-product: .pf-disabled-*, and most .pf-fx-hover-, .pf-focus-, .pf-fx-active- and group combinationsThe curated nineteenKept: hover background, foreground, border, underline, shadow and lift; focus and focus-within ring; active sink and scale-down; group-hover and group-focus foreground and lift.

The 1.0 beta rename (0.25.0 → 1.0.0-beta)

Classes are namespaced by page region — pf-header-*, pf-nav-*, pf-content-*, pf-form-*, pf-ctrl-*, pf-comp-*, pf-footer-*, pf-space-*, pf-fx-*, pf-theme-*, pf-page-* — and the __element joiner is gone: parts take one hyphen (pf-content-card-title), variants keep two (pf-ctrl-btn--ghost). For any element class not listed below, just replace __ with -. Single-property utilities (pf-mt-3, pf-text-sm, pf-fg-muted) are unchanged.

Before 0.25.01.0.0-beta
pf-accent-colorpf-fx-accent
pf-accordionpf-comp-accordion
pf-active-pf-fx-active-
pf-airypf-theme-airy
pf-alertpf-content-alert
pf-animate-pf-fx-animate-
pf-aspect-squarepf-comp-square
pf-aspect-videopf-comp-video
pf-attrpf-content-attr
pf-avatarpf-comp-avatar
pf-avatarspf-comp-avatars
pf-badgepf-comp-badge
pf-bottombarpf-comp-bottombar
pf-brand-rulepf-brand-rule
pf-brand-wellpf-brand-well
pf-breadcrumbpf-header-crumbs
pf-btnpf-ctrl-btn
pf-btn-grouppf-ctrl-group
pf-cardpf-content-card
pf-checkspf-content-checks
pf-checks-grouppf-form-checks
pf-chippf-ctrl-chip
pf-choicepf-content-choice
pf-choice-cardpf-form-choice
pf-clusterpf-space-cluster
pf-codepf-content-code
pf-cols-pf-space-cols-
pf-commentpf-content-comment
pf-compactpf-theme-compact
pf-containerpf-page-container
pf-container-qpf-space-query
pf-content-betweenpf-space-between
pf-content-startpf-space-start
pf-counterpf-form-counter
pf-coverpf-space-cover
pf-cq-pf-space-cq-
pf-cq-hidepf-space-cq-hide
pf-cq-rowpf-space-cq-row
pf-ctapf-content-cta
pf-dialogpf-comp-dialog
pf-dialog-targetpf-comp-dialog-target
pf-dividerpf-comp-divider
pf-drawerpf-comp-drawer
pf-emptypf-comp-empty
pf-eyebrowpf-content-eyebrow
pf-featurepf-content-feature
pf-feedbackpf-form-feedback
pf-fg-brandpf-brand-fg
pf-fieldpf-form-field
pf-fieldsetpf-form-fieldset
pf-filepf-form-file
pf-flex-1pf-space-grow
pf-floatpf-form-float
pf-focus-ringpf-fx-focus-ring
pf-focus-within-pf-fx-focus-within-
pf-footerpf-footer
pf-formpf-form
pf-frostpf-fx-frost
pf-gallerypf-content-gallery
pf-gradient-pf-fx-gradient-
pf-gridpf-space-grid
pf-grouppf-fx-group
pf-group-pf-fx-group-
pf-has-bottombarpf-comp-has-bottombar
pf-helppf-form-help
pf-heropf-header-hero
pf-hover-pf-fx-hover-
pf-inline-formpf-form-inline
pf-inputpf-ctrl-input
pf-input-grouppf-ctrl-input-group
pf-invertpf-theme-invert
pf-isolatepf-fx-isolate
pf-labelpf-form-label
pf-label-rowpf-form-labels
pf-ledepf-content-lede
pf-legendpf-form-legend
pf-listpf-comp-list
pf-list-nonepf-fx-plain
pf-lockuppf-brand-lockup
pf-logopf-brand-logo
pf-markpf-brand-mark
pf-measure-nonepf-page-measure-none
pf-measure-prosepf-page-measure-prose
pf-measure-widepf-page-measure-wide
pf-menupf-comp-menu
pf-meterpf-comp-meter
pf-navpf-nav
pf-pageheadpf-header-page
pf-paginationpf-comp-pagination
pf-particlespf-fx-particles
pf-planpf-content-plan
pf-popoverpf-comp-popover
pf-popover-anchorpf-comp-popover-anchor
pf-progresspf-comp-progress
pf-prosepf-content-prose
pf-quotepf-content-quote
pf-rangepf-ctrl-range
pf-ratiopf-comp-ratio
pf-retintpf-theme-retint
pf-rule-fadepf-fx-rule
pf-screenpf-content-screen
pf-scroll-containpf-fx-scroll-contain
pf-scroll-lockpf-page-lock
pf-scroll-mtpf-page-scroll-mt
pf-scroll-smoothpf-fx-scroll
pf-scrollbar-pf-fx-scrollbar-
pf-scrollerpf-content-scroller
pf-sectionpf-page-section
pf-segmentpf-comp-segment
pf-selectpf-ctrl-select
pf-shellpf-page-shell
pf-sidebarpf-page-sidebar
pf-sidenavpf-content-sidenav
pf-skeletonpf-comp-skeleton
pf-skippf-page-skip
pf-socialpf-footer-social
pf-span-fullpf-space-span
pf-specimenpf-content-specimen
pf-spinnerpf-comp-spinner
pf-splitpf-space-split
pf-stackpf-space-stack
pf-statpf-content-stat
pf-statspf-content-stats
pf-stepspf-content-steps
pf-strpf-content-str
pf-switchpf-ctrl-switch
pf-switcherpf-ctrl-switcher
pf-tablepf-content-table
pf-table-wrappf-content-table-wrap
pf-tabspf-comp-tabs
pf-tagpf-content-tag
pf-textareapf-ctrl-textarea
pf-th-sortpf-content-sortable
pf-tilepf-content-tile
pf-toastpf-comp-toast
pf-toastspf-comp-toasts
pf-toolbarpf-comp-toolbar
pf-tooltippf-comp-tooltip
pf-topbarpf-header-bar
pf-totoppf-footer-top