HomeCore Learning Journey › Lab 7 — Style the plan page

Lab 7 — Style the plan page

Purpose: Create the clientlib chain for the PHI site, style the plan-card, and prove dependency/embed behaviour.

Who this page is for

AudienceWhy it matters to you
Frontend engineersPairs with Session 7
Backend engineersWorth doing once to understand delivery of assets

Goal

Styled plan page with a proper clientlib structure and a verified include chain.

Steps

  1. In ui.frontend, add styles for the plan-card (.plan-card, covered/not-covered benefit states,

a "featured" modifier class for the Style System).

  1. Run the frontend build and confirm the output lands in the generated clientlib

(check ui.apps target or CRXDE after deploy).

  1. Ensure your page component includes phi.site (see the page component's customheaderlibs.html /

customfooterlibs.html includes).

  1. Deploy and verify: view page source — CSS should come from /etc.clientlibs/... (allowProxy at work), not /apps/....
  2. Inspect the merged bundle at /etc.clientlibs/phi-academy/clientlibs/clientlib-site.css — find your component

CSS embedded in it.

  1. Use the ClientLibs debug tool: append ?debugClientLibs=true to the page URL — bundles now load as individual

files with their source paths visible.

  1. Rebuild dependency intuition: temporarily remove dependencies=[phi.base] from clientlib-site, redeploy, and

observe what breaks and in what order CSS loads. Restore it.

Checkpoint

VerifyExpectation
Include path/etc.clientlibs, not /apps (publish tier cannot read /apps)
debugClientLibsShows constituent files and load order
Style System"Featured" style selectable on plan-card via template policy, adds your modifier class
Cache headersClientlib responses carry long-cache headers when versioned clientlibs are on

Quick navigation