NOTE: This repository is archived. The new home of the Astro AG Grid theme is https://github.com/RocketCommunicationsInc/ag-grid-theme
Demo application for testing custom Astro CSS styling.
This project was generated with Angular CLI version 9.1.4.
Run npm i
to install packages. You will also need to globally install the Angular CLI: npm install -g @angular/cli
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
The Astro AG-Grid theme follows the Astro theming guidelines and the AG-Grid theme development guidelines.
There are three parts to the Astro AG-Grid theme:
- The colors and other properties specific to Astro, which are defined in
src/css/astro.css
or any of its variants (astro.core.css
, etc) - The Astro font files, which are in
src/fonts/
and are refered to fromsrc/css/astro.css
- The Astro AG-Grid theme map itself, which is defined in
src/css/astro-theme.scss
and consumes the properties defined in thesrc/css/astro.css
file above
You will need all three to theme an AG-Grid for Astro.
-
Copy the
src/css
andsrc/fonts
folders to your AG-Grid project. -
Import the
astro-theme.scss
file in your mainsrc/styles.scss
file:
// see line 9 of styles.scss
@import 'css/astro-theme.scss';
- Apply the class "ag-theme-astro" to your
ag-grid-angular
custom element:
<ag-grid-angular class='ag-theme-astro'...></ag-grid-angular>
The Astro Dark variant is the default, which can also be specifically assigned by wrapping the grid in any element containing the class "dark-theme". The Light variant can be assigned by instead wrapping the grid in the "light-theme" class. You may also assign these Astro theme classes directly to the ag-grid-angular
component itself.
<section class="light-theme">
...
<ag-grid-angular class='ag-theme-astro'...></ag-grid-angular>
<section>
If your build process requires a different directory structure:
-
Ensure
astro.css
(or variant) has access to the fonts, which are currently expected to be available relative to theastro.css
file at../fonts/
. -
Ensure that the
astro-theme.scss
file has access to the astro.css (or variant) file, which is currently expecte to be a sibling. If you change the location ofsrc/css/astro.css
, make sure to update line 6 ofastro-theme.scss
to the new path.