Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Instructions for use #4

@catgofire

Description

@catgofire

Might be helpful to give better instructions on how to make this work.

For a Sage-based theme

./app/setup.php

/**
 * Style the wp-admin area
 */
add_action('admin_enqueue_scripts', function(){
    wp_enqueue_style('admin-styles', asset_path('styles/admin.css'));
});

./resources/assets/config.json

{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "admin": [
      "./styles/admin.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
....
}

./resources/assets/styles/admin.scss

// Admin styles
@import "~wordpress-ui/admin";

// Login styles
@import "~wordpress-ui/login";

// WordPress classes
@import "~wordpress-ui/admin-bar";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions