Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BD-46] refactor: refactoring buttons variants #75

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d4e4fa4
fix: fixing Tertiary and Primary buttons styles in focus state (#57)
PKulkoRaccoonGang May 5, 2023
a295d82
fix: update readme (#56)
adamstankiewicz Apr 11, 2023
10557a3
feat: implement design tokens in edx.org brand theme (#45)
PKulkoRaccoonGang Apr 21, 2023
5c8d60f
fix: fixing Tertiary and Primary buttons styles in focus state (#57) …
adamstankiewicz Jun 3, 2023
6e9d549
fix: upgrade paragon (#60)
adamstankiewicz Jun 3, 2023
278e343
fix: add empty .npmignore to ensure dist folder gets published (#62)
adamstankiewicz Jun 3, 2023
39fe2da
feat: compile source tokens only (#63)
adamstankiewicz Jun 4, 2023
18d8bcd
fix: ensure core css is generated (#64)
adamstankiewicz Jun 4, 2023
90790c8
fix: import Inter font family from google fonts in css/core/index.css…
adamstankiewicz Jun 4, 2023
746ec7c
fix: add missing token for button focus outline border radius (#66)
adamstankiewicz Jun 4, 2023
f0d0c60
fix: upgrade to paragon-alpha.35 (#67)
adamstankiewicz Jun 4, 2023
1d91494
fix: added grid-gutter-width token (#68)
PKulkoRaccoonGang Jun 16, 2023
3c7af69
fix: update grid-gutter-width to 64px to result in 32px left and righ…
adamstankiewicz Jul 16, 2023
a04008c
fix: experiment with not including @import for font in core CSS (#69)
adamstankiewicz Jul 22, 2023
f31629d
feat: add defaults to theme-urls.json output on build (#70)
adamstankiewicz Jul 23, 2023
43d9dc8
feat: POC for dark mode demo (#71)
adamstankiewicz Jul 25, 2023
d9f9bd1
fix: include token for color-primary-300 for dark theme (#73)
adamstankiewicz Jul 25, 2023
5fd2361
Revert temporary dark theme tokens (#74)
adamstankiewicz Jul 25, 2023
1488f36
refactor: refactoring buttons variants
PKulkoRaccoonGang Jul 27, 2023
e4a113a
refactor: refactoring form-feedback messages
PKulkoRaccoonGang Aug 10, 2023
a8e7196
refactor: added box-shadows
PKulkoRaccoonGang Aug 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on:
pull_request:
jobs:
ci:
name: CI
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build theme
run: npm run build
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build theme
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.DS_Store
.vscode
node_modules
dist
Empty file added .npmignore
Empty file.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build:
rm -rf dist && mkdir dist
npm run build-scss
42 changes: 35 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project contains branding assets and themes for edx.org. It is the edX impl
Usage
-----

Install this package one of two ways.
Install this package one of two ways:


Versioned with npm. Including this project this way will allow you to control the version you pull into your application. This is safer, but it also means you will need to manually update it or use some automation to update it for you.
Expand Down Expand Up @@ -102,14 +102,42 @@ Default fallback image for `Card.ImageCap` component
Paragon Theme
-------------

Use the theme in this package as described in the Paragon docs: https://edx.github.io/paragon/
You can use the theme in two ways:

.. code-block:: sass
1. this repo builds and publishes its own CSS files (located in the `dist` directory) by including and overriding Paragon's styles,
so you can just inject them into your application **without** needing to import / compile Paragon's style separately
2. compile the styles on your own in your application
.. code-block:: sass

@import "@edx/brand/paragon/fonts";
@import "@edx/brand/paragon/variables";
@import "@edx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";
@import "@edx/brand/paragon/core";
@import "@edx/brand/paragon/css/themes/light/variables";
@import "@edx/brand/paragon/css/themes/light/utility-classes";


-------------------------------------
Theming with Paragon's Design Tokens
-------------------------------------
Starting from `v21` Paragon uses style-dictionary to build CSS variables from design tokens (i.e. JSON files), Paragon
allows to override design tokens values before building CSS variables allowing to apply custom theme.

See `tokens` directory for tokens that edX.org theme overrides. This directory should follow the same folder/JSON structure as is used on whatever version of Paragon is installed in this repository. These JSON files are deep-merged with the default/standard Paragon design tokens.
Note that some tokens have `"modify": null` property specified, this is done to disable default Paragon's behaviour that modifies this specific token in some way, read more about token's modifications during build time here[TODO: add link to Paragon readme].

Building design tokens
#############################

#. Install Paragon with

.. code-block:: bash

npm install

#. Update values in `tokens` folder
#. Run following command to build updated CSS files with CSS variables (they are located in `paragon/css` directory)

.. code-block:: bash

npm run build-design-tokens


--------------------------------
Expand Down
Loading