Manage CSS Files in Microsoft Power Pages

Manage CSS Files in Microsoft Power Pages

CSS (Cascading Style Sheets) controls the visual appearance of your Microsoft Power Pages website. Power Pages includes several default CSS files, while also allowing makers and developers to upload custom CSS files to implement advanced branding, layouts, and styling customizations.

Understanding Power Pages CSS Architecture

By default, Power Pages includes the following CSS files:

You can customize styling through the Styling Workspace or upload additional CSS files to extend website functionality and branding.

Manage Custom CSS Files in the Styling Workspace

The Styling Workspace provides an easy way to manage CSS files without accessing Portal Management directly.

  1. Open Microsoft Power Pages.
  2. Select your website and choose Edit.
  3. Navigate to the Styling Workspace.
  4. Select More Options.
  5. Choose Manage CSS.

The Manage CSS interface displays both system and custom CSS files associated with your website.

Upload Custom CSS Files

You can upload your own CSS files to apply custom branding and styling rules.

  1. Open the Manage CSS window.
  2. Review the existing CSS files.
  3. Select Upload.
  4. Choose your CSS file.
  5. Upload and save the configuration.

Once uploaded, the CSS file becomes available as a Web File within Portal Management.

Manage CSS Priority and Precedence

Custom CSS files can be reordered to control which styles are applied when multiple CSS rules target the same element.

Option Description
Move Up Increase file priority.
Move Down Reduce file priority.
Disable Temporarily disable the CSS file.
Enable Reactivate a disabled CSS file.

CSS Architecture and Loading Order

Power Pages applies CSS files according to a predefined loading hierarchy.

CSS File Priority
theme.css Lowest
Custom CSS Files Medium
portalbasictheme.css Highest

This architecture encourages makers to use the Styling Workspace for standard customizations while allowing developers to extend functionality through custom CSS.

Delete a Custom CSS File

If a custom CSS file is no longer needed, you can remove it from the website.

  1. Open the Portal Management App.
  2. Navigate to Web Files.
  3. Locate the custom CSS file.
  4. Filter by Name or Website if necessary.
  5. Select the CSS file.
  6. Choose Delete.
  7. Save your changes.

Sync Configuration Changes

After deleting or modifying CSS files, synchronize the website configuration.

  1. Open Design Studio.
  2. Select Sync Configuration.
  3. Wait for synchronization to complete.
  4. Refresh the website.

The updated styling changes will now be reflected across the site.

Benefits of Using Custom CSS

Best Practices

Summary

Managing CSS files in Microsoft Power Pages allows organizations to create customized and branded website experiences. By understanding CSS architecture, file precedence, upload management, and synchronization processes, developers can effectively control the visual appearance of Power Pages websites while maintaining scalability and maintainability.