microsoft/power-platform-skills / plugins/power-pages/skills/edit-site
edit-site
VerifiedPlans, coordinates and customizes PAC CLI-downloaded Standard or Enhanced data model non-SPA Power Pages sites created from Microsoft templates or manually in Design Studio. Use for requests involving pages, localized content, navigation, assets, snippets, site markers, Liquid/web templates, page layouts, or styling. Coordinated work produces an approved browser-viewable plan, executes changes in dependency order, verifies the local result, and optionally hands off to deployment. Not for React, Angular, Vue, or Astro SPA sites.
references/styling/styling-policy.md
View on GitHub# Local styling placement and source protection
Use this policy before preparing any local change. Microsoft Learn defines platform support; the [source index](sources.md) separates current support guidance from historical techniques.
## Choose the local representation before writing
Default to **VS Code/local authoring for both listed and unlisted properties**. Required `owner: "custom"` means local authoring, not that the component is custom or lacks native support. Use [Studio component capabilities](studio-component-capabilities.md) to describe **component Design-panel availability**, not exclusive ownership or authorization to force a handoff. Resolve the actual selected component/property/tab, not the descriptor kind or containing element. For child text/button rules, assess the child rather than the Section's capabilities. Flex is conditional; the map does not describe other Studio surfaces or site themes.
**Not listed does not mean "do not style."** Allow unlisted properties as approved local inline declarations or scoped CSS with the exact Design-panel warning. Unknown component support is unverified, not borrowed from another family. Keep unlisted/unknown/conditional warnings visible in review, approval and the final report; never promise local CSS values populate native controls. Standard CSS authoring uses pinned bundled css-tree, not a skill-specific property/value or part allowlist. Parser semantics and browser support remain independent of Design-panel membership: fix invalid values or verify newer support when grammar is unverified, without bypassing errors.
| Intent | Local placement | Required scope evidence |
|---|---|---|
| An individual component property, including native Design-panel properties | Prefer the existing static inline declaration in that component's Page Copy; otherwise use scoped CSS where effective, or add a quoted style attribute when it is the right component representation | Verify the exact source tag and selected locale. A reachable shared-template inline edit requires explicit site scope, potentially affecting every page. Do not blanket-inline reusable styles. |
| Theme colors, typography, buttons, or spacing | Reusable custom CSS Web File; explicit `global: true` raw CSS when theme selectors intentionally extend beyond components | Verify inheritance, tokens, names and all matching elements in the selected placement scope. Global rules require expanded review, not fictitious classes/source hooks. Do not modify default theme assets or invent a theme-metadata writer. |
| Reusable custom styling, including unlisted Design-panel properties | Existing appropriate custom CSS Web File; create one only when necessary | Warn about missing/unverified Design-panel editability; use a unique reusable class and identify affected instances/pages. |
| An exact-page stylesheet adjustment | Resolved Web Page Custom CSS sidecar for the intended localized content record | Confirm page identity, locale, and physical sidecar. CSS applies to that page, not automatically to every translation. |
| A section-wide adjustment | CSS Web File parented to that section's page | Disclose **the parent and all descendants**, including translated pages, before approval. |
| A site-wide custom component style | Appropriate custom CSS Web File parented to the verified site root | Derive the root from relationships and URL metadata, never the name “Home.” Site scope alone does not enable global selectors; explicit raw `global: true` and expanded review do. |
| A native form, list, or form control | Stable wrapper or documented metadata CSS Class hook, with CSS in the applicable location above | Inspect the actual variant and hook. Do not invent a form/list Custom CSS field or depend on generated IDs. |
| A repeated Liquid component | Shared class and custom stylesheet; explicit modifiers for instance variations; update a verified static inline declaration only when that is the actual component representation | Preserve manifest, parameters, includes, editable regions, and existing class tokens. Shared-template inline changes require site scope and expanded review. |
Sources: [Manage CSS](https://learn.microsoft.com/power-pages/configure/manage-css), [Advanced CSS](https://learn.microsoft.com/training/modules/power-pages-extend/css), [component editing](https://learn.microsoft.com/power-pages/getting-started/customize-pages).
Microsoft recommends Studio for out-of-box controls; that is a **recommendation, not a VS Code prohibition**. Paintbrush changes generally take precedence over inherited/custom CSS, which motivates editing the actual locally serialized declaration rather than producing ineffective stylesheet rules. The Desktop extension supports offline editing of downloaded site content. None of these sources makes Design-panel membership an exclusive authoring boundary.
**Explicitly requested Studio instructions-only can be a complete outcome.** Reserve `owner: "studio"` for that user intent; require `handoffReason: "user-requested"` and exact `studioAction` instructions. Native support alone is not a handoff reason. Do not invent a Design-panel control for an unlisted property; verify any separate Studio surface. Mixed requests keep explicitly requested instructions and local edits separate. If a local edit is unrepresentable, ambiguous or generated-source-owned, report it as **blocked**, with a specific local next step, not successful zero-write Studio work. Never change an old plan or inherit approval: regenerate legacy zero-write requests lacking the explicit handoff reason and obtain new approval.
## Preserve the cascade rather than overpowering it
- Never replace, deactivate, delete, or reorder `bootstrap.min.css`, `theme.css`, or `portalbasictheme.css`; do not create a second default file under a different name.
- For every existing or new CSS Web File change, mention that custom CSS has higher priority than `theme.css` and lower priority than `portalbasictheme.css`. This is **advisory priority guidance**, not an integer inequality, a metadata repair task or a write prerequisite.
- Do not derive CSS priority from `displayorder`, validate a numeric band, allocate slots, renumber files or require runtime load-order evidence to proceed. Missing, equal, adjacent or otherwise different display-order values do not block styling. Preserve existing ordering metadata; new CSS Web Files omit `displayorder`.
- Inspect applicable Web Files by parent/descendant scope. Their path-sorted inventory and any displayed ordering metadata are not runtime load order or proof of cascade priority.
- File order alone does not determine the winner. Explain relevant selector specificity, inline declarations, inheritance, importance, and existing cascade layers for each proposed rule.
- **Layer-priority warning:** within the same author origin, unlayered normal Power Pages default/theme CSS outranks normal `@layer` rules regardless of selector specificity or stylesheet order. Do not blindly put default overrides into new layers; honor the actual layer/unlayered architecture. `@layer` remains supported: disclose conflicts in review, preserve default files, and do not blindly add `!important`.
- Studio component styling generally takes precedence over theme/inherited/custom styles. When an inline property wins, update that verified local declaration; do not emit ineffective CSS, blindly escalate priority/specificity, rewrite the DOM or replace native components. Broad/global important rules are discouraged, not a substitute for source-aware placement.
- Preparation guards directly addressable component roots/root states against stylesheet values that lose to existing inline properties, including raw CSS; exact already-equal values are permitted. Descendant/generated targets still need explicit source/cascade review. A passing guard does not prove the effective cascade.
- To enable responsive/state CSS, an inline group can explicitly remove an exact existing property with `declarations: {"property": null}` and add scoped CSS in the **same approved plan**. Removal-only groups are valid. Null is not a CSS value and is rejected in stylesheet/Studio groups. Preserve other inline properties, attributes/markers and priority. Shorthand removal removes the whole declaration; preserve needed longhands in planned styles and review the actual diff, not a guessed equivalent.
- Preserve existing inline `!important` on the same requested property. Authored priority changes require nonempty `importantReason` and expanded diff review; the reason cannot bypass root conflicts or conflicting related important shorthand/longhand rules. Identify exact local remediation rather than silently producing ineffective CSS.
- Safely parse/encode quoted font stacks, HTML entities, CSS comments and escapes in inline declarations; these are not blanket rejections. The entities codec may normalize spelling only inside the style attribute; preserve the rest of the tag/document exactly except approved class additions. Malformed, injected or legacy executable CSS still fails, as do ambiguous tags and conflicting important declarations.
- Keep authored/insertion declaration order, not alphabetical sorting: shorthands reset longhands. Pinned mdn-data supplies shorthand effects with logical-side safety; conflicting important effects still block with local remediation.
- Layers and custom properties are normal CSS: preserve existing cascade semantics, namespace new keyframe/font/property/layer names with `pp-`/`--pp-`, or use raw `global: true` and review shared naming. Reuse project tokens where suitable; do not assume Studio exposes a particular token scheme. Explicit global rules affect all matching elements in the page/section/site placement scope.
- A CSS field contains CSS, not a `<style>` element. A CSS Web File requires a partial URL ending in `.css` to participate in parent/descendant styling.
## Reuse without restructuring
Style both newly added and existing native components: sections, text, buttons, images, navigation, forms/lists, and Liquid/web-template components. For a new native component that does not yet exist locally, guide its creation through supported authoring controls and inspect the resulting local markup before proposing guarded class edits. Do not substitute invented sample markup for a native component.
General `declarations` accept CSS properties/values, including custom properties, font stacks, sizing/layout, shadows, transforms, transitions and all gradient kinds/functions. Alternative `css` accepts a full local stylesheet instead of declarations, with no `part`: responsive rules, selectors, keyframes/reduced motion, fonts, tokens, `@property` and layers use normal CSS. There is no closed selector-part list; stable descendants/states/pseudo-elements must remain in the verified `pp-*` subtree by default.
Every raw `style.css` takes expanded review for selectors, conditions and global definitions, as do `global: true`, nonempty `externalResources` or `importantReason`. Ordinary broad declarations remain eligible for the small-change route within its page/source/file limits.
Component-scoped styles require real source/hooks; inline-only components may omit `className` and use exact tags. If supplied, the class must identify that actual tag, existing or approved via `classEdits`. Source-free descriptors are allowed only for explicit global raw stylesheets or user-requested Studio handoffs. Global themes need no fictitious source/class; they still require verified placement and expanded review of all matching elements. None of this creates components, native metadata hooks or authorizes generated-source overwrites. See the [general CSS and inline contracts](proposal-and-verification.md).
Static class/style editing supports real rendered tags, including input, textarea, SVG and outer local iframe/embedded elements, not a fixed wrapper list. Static tags and CSS values may span lines; exact whitespace/newlines still matter. Only class/style attributes change; embedded contents are never entered or treated as local DOM targets. Exact local tag/context/source/hash checks remain mandatory; runtime-discovery exclusions are unchanged.
Prefer an existing stable wrapper or metadata hook over new markup. Repeated components share one namespaced class; variations use modifiers rather than copied CSS or duplicate IDs. Preserve Bootstrap containers, accessibility semantics, Studio editing attributes, Liquid expressions, template parameters, and unrelated content.
Do not rewrite native forms/lists with custom HTML or presentation-only JavaScript. Preserve labels, required markers, validation, permissions, submit behavior, list actions, and delayed rendering. Hiding with CSS is **not authorization**. PCF internals, third-party widgets, iframe contents, and shadow-root internals are outside this skill.
## Resource and parser review
Declare exact external HTTPS CSS URL references in `externalResources`; relative/root-relative/fragment Web File URLs need no external declaration. Reject protocol-relative URLs, JavaScript/file schemes, unreviewed external tracking/font/image URLs and data payloads; use approved Web Files instead. Review CSP, availability, licensing and privacy. The compiler does not fetch resources or imports, and browser/network access is not a prerequisite.
`@import` requires raw `global: true`, explicit external URL declarations when applicable and valid beginning-of-stylesheet placement; use a new custom file when existing content would make it late, without moving defaults. Global/import/priority effects and exact external-resource warnings belong in the hashed review. Resolve missing evidence honestly; do not fetch automatically or treat disclosure as approval.
Parser grammar support is not proof of Power Pages/browser/Studio rendering. Unknown or semantic-grammar-unverified values yield explicit warnings, not automatic declarations of platform incompatibility. Fix actual invalid CSS or verify newer browser support before approving; never bypass errors. Real restrictions such as unknown Bootstrap, unsafe side effects, missing component sources and generated outputs remain independent of CSS syntax.
## Local editing safeguards
1. Record each change's owner, location, scope, target record/file, locale, selector/hook or exact inline tag, baseline hash, proposed content, rationale, and affected pages/components.
2. Prefer the actual inline declaration for a component-specific change; otherwise prefer an existing effective custom stylesheet. For a new Web File, establish the export schema, website/parent/publication relationships, attachment metadata and unique partial URL from verified context; omit `displayorder`. Different site/section destinations that collide on a physical path require distinct CSS filenames; different parent URLs do not make that collision safe. Preserve existing IDs; use the plugin UUID helper for new IDs.
3. If required identity/schema/relationship metadata, generated-source ownership, a locale, or an edit anchor is ambiguous, stop and give a specific local next step: resolve the source tag/locale, acquire missing source without overwriting dirty files, or separately review source-pipeline changes. Display-order metadata is not such a prerequisite. Do not guess YAML, silently broaden scope or relabel the blocker as a Studio-only success.
4. Use the deterministic preparation/apply scripts. Preserve unrelated bytes, comments, line endings, and existing class tokens. Never reserialize a whole HTML/YAML document for a styling edit.
5. If an existing source pipeline owns a stylesheet, stop this automated apply path. Preparation detects same-basename `.scss`/`.sass`/`.less` siblings and generated/source-map markers in CSS. Source changes and compilation require a separate reviewed authoring task using the existing compiler; the styling request schema does not represent them. Do not remove ownership markers, overwrite generated output, or install a new toolchain.
6. Stage and validate the complete change set before writes. Refuse traversal, symlink escapes, duplicate ownership markers, changed inputs, and ambiguous matches. Reapplication must not duplicate rules, classes, or metadata.
7. Keep review artifacts and the recovery receipt **outside the uploadable site tree**. Report write failures and partial state explicitly; never use broad Git reset, automatic rollback, or overwrite a concurrent edit.
This skill does not run PAC, authenticate to Dataverse, change remote metadata, upload, publish, activate, or clear caches. An independent, later deployment remains the user's decision.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |