Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

make @songhay/index styling configurable #20

Closed
BryanWilhite opened this issue Apr 16, 2019 · 12 comments
Closed

make @songhay/index styling configurable #20

BryanWilhite opened this issue Apr 16, 2019 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@BryanWilhite
Copy link
Owner

a conventional and/or configurable external CSS file should provide styling customization for the Index App

continuing on from #11

@BryanWilhite BryanWilhite added the enhancement New feature or request label Apr 16, 2019
@BryanWilhite BryanWilhite self-assigned this Apr 16, 2019
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 17, 2019

currently there are only 10 style files in the @songhay/index library:
image

component-level styling (and any shared files imported on the component level are bundled in the library)—we can see this by looking at *component.js files in the dist/ folder:
image

this fundamental knowledge about Angular is awesome news 👍

@BryanWilhite
Copy link
Owner Author

there are two leading ways to parameterize CSS in Angular:

the 2016 way, using a plain-old JavaScript object and [ngStyle]:
image

the 2018 way with CSS Variables and a full-blown theme directive:
image

@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 17, 2019

i have set up a samples to show myself 👀 how to move forward:

it is probably possible to use CSS variables with ngStyle, assuming JavaScript properties can begin with -- 🤦‍♂️

BryanWilhite added a commit that referenced this issue Apr 17, 2019
@BryanWilhite
Copy link
Owner Author

it looks like the dependency on @angular/flex-layout can be removed:
image

BryanWilhite added a commit that referenced this issue Apr 17, 2019
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 17, 2019

akyinkyin theming has to be removed (except for akyinkyin.svg—would require a new issue):
image

@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 18, 2019

i am totally guessing here (_index.scss):

a {
    &.index {
        &:link {
            color: var(--link-color);
        }
        &:active {
            color: var(--link-visited-color);
        }
        &:visited {
            color: var(--link-visited-color);
        }

        &:link,
        &:active,
        &:visited {
            text-decoration: var(--link-text-decoration);
        }
        &:hover {
            text-decoration: var(--link-hover-text-decoration);
            text-decoration-color: var(--link-hover-text-decoration-color);
        }
    }
}

BryanWilhite added a commit that referenced this issue Apr 18, 2019
BryanWilhite added a commit that referenced this issue Apr 18, 2019
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 18, 2019

in case i am wondering in future, the ---mat-option-selected-color would be this:
image

which is based on this (akyinkyin/_palette.scss):

$akyinkyin-light-text: map-get($map: $mat-akyinkyin-green, $key: 50);

which is wrong; it should be more like this (#00ff7e):
image

or exactly like this: #00ee3b which is this:

$akyinkyin-light-tint: map-get($map: $mat-akyinkyin-green, $key: A700);

BryanWilhite added a commit that referenced this issue Apr 18, 2019
@BryanWilhite
Copy link
Owner Author

another wild guess: @HostBinding at a parent/container component level should cascade down to child components 👀

BryanWilhite added a commit that referenced this issue Apr 18, 2019
BryanWilhite added a commit that referenced this issue Apr 18, 2019
BryanWilhite added a commit that referenced this issue Apr 18, 2019
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 19, 2019

okay, huge army of people helping me 🙄, let's wrap this up:

  • actually apply @HostBinding on index-container level only
  • work though layout issues
    • install @angular/flex-layout because it is needed 🏗
    • add dark and light :link 💄
    • deal with .mat-spinner 🔨
  • publish on npm

@BryanWilhite
Copy link
Owner Author

setting the style property on a container component appears to cascade down to child components:
image

BryanWilhite added a commit that referenced this issue Apr 19, 2019
BryanWilhite added a commit that referenced this issue Apr 19, 2019
BryanWilhite added a commit that referenced this issue Apr 19, 2019
BryanWilhite added a commit that referenced this issue Apr 19, 2019
@BryanWilhite
Copy link
Owner Author

BryanWilhite commented Apr 19, 2019

.mat-spinner drama:

<div *ngIf="indexEntriesStore.isBusy" fxFlex="100">
    <mat-spinner color="accent"></mat-spinner>
</div>
  • declaring a fxFlex attribute on .mat-spinner is not 🔥 the way to go
  • declare this on the .mat-spinner selector: margin: 0 auto;

BryanWilhite added a commit that referenced this issue Apr 19, 2019
BryanWilhite added a commit that referenced this issue Apr 19, 2019
@BryanWilhite
Copy link
Owner Author

add path to SVG sprites to IndexOptions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant