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

Feature/update layout helpers #81

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 22 additions & 20 deletions assets-src/styles/advanced.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,46 @@
/*------------------------------------*\
#Settings
\*------------------------------------*/
@import "sass/00-settings/breakpoints";
@import "sass/00-settings/colors";
//@import "sass/00-settings/debug";
@import "sass/00-settings/typesetting";
@import 'sass/00-settings/breakpoints';
@import 'sass/00-settings/colors';
//@import 'sass/00-settings/debug';
@import 'sass/00-settings/typesetting';


/*------------------------------------*\
#Functions
\*------------------------------------*/
@import "sass/10-functions/units";
@import 'sass/10-functions/units';
@import 'sass/10-functions/css-custom-props';


/*------------------------------------*\
#Mixins
\*------------------------------------*/
@import "sass/20-mixins/font-sizes";
@import "sass/20-mixins/media-query";
@import "sass/20-mixins/stack";
@import 'sass/20-mixins/css-custom-props';
@import 'sass/20-mixins/font-sizes';
@import 'sass/20-mixins/media-query';
@import 'sass/20-mixins/stack';


/*------------------------------------*\
#Base

Repeated to allow for extending placeholders
\*------------------------------------*/
@import "sass/30-base/hide-and-show";
@import 'sass/30-base/hide-and-show';


/*------------------------------------*\
#Advanced components

For JS enhancements
\*------------------------------------*/
@import "sass/60-advanced-components/navigation";
@import "sass/60-advanced-components/cards";
@import "sass/60-advanced-components/collapsibles";
@import "sass/60-advanced-components/disclosure-widget";
@import "sass/60-advanced-components/sortable-tables";
@import 'sass/60-advanced-components/navigation';
@import 'sass/60-advanced-components/cards';
@import 'sass/60-advanced-components/collapsibles';
@import 'sass/60-advanced-components/disclosure-widget';
@import 'sass/60-advanced-components/sortable-tables';
//@import "sass/60-advanced-components/slider";

/*------------------------------------*\
Expand All @@ -51,9 +53,9 @@
Add third-party plugins here.
Add custom styles directly after the original in a separate file
\*------------------------------------*/
@import "../../node_modules/accessible-autocomplete/src/autocomplete";
@import "sass/70-third-party-plugins/s24-accessible-autocomplete";
@import "../../node_modules/@splidejs/splide/src/css/core/index";
@import "sass/70-third-party-plugins/s24-splide-carousel";
@import "../../node_modules/tabbyjs/src/sass/tabby-ui";
@import "sass/70-third-party-plugins/s24-tabby-ui";
@import '../../node_modules/accessible-autocomplete/src/autocomplete';
@import 'sass/70-third-party-plugins/s24-accessible-autocomplete';
@import '../../node_modules/@splidejs/splide/src/css/core/index';
@import 'sass/70-third-party-plugins/s24-splide-carousel';
@import '../../node_modules/tabbyjs/src/sass/tabby-ui';
@import 'sass/70-third-party-plugins/s24-tabby-ui';
126 changes: 64 additions & 62 deletions assets-src/styles/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,98 +5,100 @@
/*------------------------------------*\
#Settings
\*------------------------------------*/
@import "sass/00-settings/breakpoints";
@import "sass/00-settings/colors";
//@import "sass/00-settings/debug";
@import "sass/00-settings/fonts";
@import "sass/00-settings/typesetting";
@import 'sass/00-settings/breakpoints';
@import 'sass/00-settings/colors';
//@import 'sass/00-settings/debug';
@import 'sass/00-settings/fonts';
@import 'sass/00-settings/typesetting';


/*------------------------------------*\
#Functions
\*------------------------------------*/
@import "sass/10-functions/units";
@import 'sass/10-functions/units';
@import 'sass/10-functions/css-custom-props';


/*------------------------------------*\
#Mixins
\*------------------------------------*/
@import "sass/20-mixins/font-sizes";
@import "sass/20-mixins/media-query";
@import "sass/20-mixins/stack";
@import 'sass/20-mixins/css-custom-props';
@import 'sass/20-mixins/font-sizes';
@import 'sass/20-mixins/media-query';
@import 'sass/20-mixins/stack';


/*------------------------------------*\
#Base
\*------------------------------------*/
@import "sass/30-base/box-sizing";
@import "sass/30-base/body";
@import "sass/30-base/typography";
@import "sass/30-base/media";
@import "sass/30-base/hide-and-show";
@import "sass/30-base/flow-elements";
@import "sass/30-base/buttons-and-links";
@import "sass/30-base/skip-link";
@import "sass/30-base/details-and-summary";
@import "sass/30-base/svg";
@import "sass/30-base/icons";
@import "sass/30-base/lists";
@import "sass/30-base/quotes";
@import "sass/30-base/tables";
@import "sass/30-base/animation";
@import "sass/30-base/focus";
@import 'sass/30-base/box-sizing';
@import 'sass/30-base/body';
@import 'sass/30-base/typography';
@import 'sass/30-base/media';
@import 'sass/30-base/hide-and-show';
@import 'sass/30-base/flow-elements';
@import 'sass/30-base/buttons-and-links';
@import 'sass/30-base/skip-link';
@import 'sass/30-base/details-and-summary';
@import 'sass/30-base/svg';
@import 'sass/30-base/icons';
@import 'sass/30-base/lists';
@import 'sass/30-base/quotes';
@import 'sass/30-base/tables';
@import 'sass/30-base/animation';
@import 'sass/30-base/focus';


/*------------------------------------*\
#Forms
\*------------------------------------*/
@import "sass/35-forms/forms";
@import "sass/35-forms/checkboxes-radios";
@import "sass/35-forms/memorable-dates";
@import "sass/35-forms/segmented-options";
@import "sass/35-forms/select";
@import 'sass/35-forms/forms';
@import 'sass/35-forms/checkboxes-radios';
@import 'sass/35-forms/memorable-dates';
@import 'sass/35-forms/segmented-options';
@import 'sass/35-forms/select';


/*------------------------------------*\
#Layout helpers
\*------------------------------------*/
@import "sass/40-layout-helpers/box";
@import "sass/40-layout-helpers/center";
@import "sass/40-layout-helpers/cover";
@import "sass/40-layout-helpers/cluster";
@import "sass/40-layout-helpers/frame";
@import "sass/40-layout-helpers/sidebar";
@import "sass/40-layout-helpers/switcher";
@import 'sass/40-layout-helpers/box';
@import 'sass/40-layout-helpers/center';
@import 'sass/40-layout-helpers/cover';
@import 'sass/40-layout-helpers/cluster';
@import 'sass/40-layout-helpers/frame';
@import 'sass/40-layout-helpers/sidebar';
@import 'sass/40-layout-helpers/switcher';


/*------------------------------------*\
#Core components
\*------------------------------------*/
@import "sass/50-core-components/header";
@import "sass/50-core-components/logo";
@import "sass/50-core-components/navigation";
@import "sass/50-core-components/breadcrumbs";
@import "sass/50-core-components/main";
@import 'sass/50-core-components/header';
@import 'sass/50-core-components/logo';
@import 'sass/50-core-components/navigation';
@import 'sass/50-core-components/breadcrumbs';
@import 'sass/50-core-components/main';
//@import "sass/50-core-components/hero";
@import "sass/50-core-components/text";
@import "sass/50-core-components/quotes";
@import "sass/50-core-components/images";
@import "sass/50-core-components/avatars";
@import "sass/50-core-components/video";
@import "sass/50-core-components/notes";
@import 'sass/50-core-components/text';
@import 'sass/50-core-components/quotes';
@import 'sass/50-core-components/images';
@import 'sass/50-core-components/avatars';
@import 'sass/50-core-components/video';
@import 'sass/50-core-components/notes';
//@import "sass/50-core-components/social";
@import "sass/50-core-components/cards";
@import "sass/50-core-components/shelves";
@import "sass/50-core-components/progress-indicator";
@import 'sass/50-core-components/cards';
@import 'sass/50-core-components/shelves';
@import 'sass/50-core-components/progress-indicator';
//@import "sass/50-core-components/payment-details";
@import "sass/50-core-components/tag-list";
@import 'sass/50-core-components/tag-list';
//@import "sass/50-core-components/fifty-fifty";
@import "sass/50-core-components/collapsibles";
@import "sass/50-core-components/carousel";
@import "sass/50-core-components/search";
@import 'sass/50-core-components/collapsibles';
@import 'sass/50-core-components/carousel';
@import 'sass/50-core-components/search';
//@import "sass/50-core-components/meta-info";
@import "sass/50-core-components/pagination";
@import "sass/50-core-components/footer";
@import 'sass/50-core-components/pagination';
@import 'sass/50-core-components/footer';


/*------------------------------------*\
Expand All @@ -110,13 +112,13 @@

1. Used purely for the static Amplify site
\*------------------------------------*/
@import "sass/85-amplify/amplify-guide"; /* 1 */
@import 'sass/85-amplify/amplify-guide'; /* 1 */


/*------------------------------------*\
#Utilities
\*------------------------------------*/
@import "sass/90-utilities/alignments";
@import "sass/90-utilities/clearfix";
@import "sass/90-utilities/layout";
@import "sass/90-utilities/margins";
@import 'sass/90-utilities/alignments';
@import 'sass/90-utilities/clearfix';
@import 'sass/90-utilities/layout';
@import 'sass/90-utilities/margins';
2 changes: 1 addition & 1 deletion assets-src/styles/sass/00-settings/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ $bp-tab-landscape: 1024;
$bp-lap: 1280;
$bp-desk: 1440;

$max-inline-size: 1120;
$max-inline-size: 1120;

$text-measure: 660; /* 1 */
47 changes: 47 additions & 0 deletions assets-src/styles/sass/10-functions/_css-custom-props.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*------------------------------------*\
#Get CSS custom properties

Function for retrieving automatically prefixed CSS custom properties
(CSS variables) to ensure they are handled in a consistent, scalable manner.

See https://dev.to/felipperegazio/css-custom-properties-vars-with-sass-scss-a-practical-architecture-strategy-1m88
\*------------------------------------*/

/**
* Basic usage:
*
* .selector {
* color: cssvar(primary-color);
* }
*
* will result in
*
* .selector {
* color: var(--amplify-primary-color);
* }
*
* Overriding the default prefix:
*
* .selector {
* color: cssvar(primary-color, s24);
* }
*
* will result in
*
* .selector {
* color: var(--s24-primary-color);
* }
*/

// @function cssvar($name, $prefix: amplify) {
// @return var(--#{$prefix}-#{$name});
// }

@function cssvar($name, $prefix: amplify, $fallback: null) {
@if $fallback != null {
@return var(--#{$prefix}-#{$name}, #{$fallback});
}
@else {
@return var(--#{$prefix}-#{$name});
}
}
Loading