Skip to content

Commit

Permalink
utility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
extrabright committed Oct 11, 2023
1 parent a7b801d commit 5e5a94e
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 44 deletions.
4 changes: 2 additions & 2 deletions dist/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/utility.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/utility.css.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@webpixels/css",
"description": "Utility and component-centric design system based on Bootstrap for fast, responsive UI development.",
"version": "2.0.0-beta.12",
"version": "2.0.0-beta.13",
"version_short": "2.0",
"license": "MIT",
"style": "dist/index.css",
Expand Down Expand Up @@ -32,6 +32,9 @@
},
"bugs": {
"url": "https://github.com/webpixels/css/issues"
},
"bin": {
"webpixels": "./bin.js"
},
"scripts": {
"build": "npm run css",
Expand Down
20 changes: 10 additions & 10 deletions scss/core/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

// White/Grays/Black colors
$white: #FFF !default;
$gray-50: #f9fafb !default;
$gray-100: #f3f4f6 !default;
$gray-200: #e5e7eb !default;
$gray-300: #d1d5db !default;
$gray-400: #9ca3af !default;
$gray-500: #6b7280 !default;
$gray-600: #4b5563 !default;
$gray-700: #374151 !default; // Used for text color
$gray-800: #1f2937 !default; // Used for headings color
$gray-900: #111827 !default;
$gray-50: #f8fafc !default;
$gray-100: #f1f5f9 !default;
$gray-200: #e2e8f0 !default;
$gray-300: #cbd5e1 !default;
$gray-400: #94a3b8 !default;
$gray-500: #64748b !default;
$gray-600: #475569 !default;
$gray-700: #334155 !default; // Used for text color
$gray-800: #1e293b !default; // Used for headings color
$gray-900: #0f172a !default;
$black: #000 !default;

// Base colors
Expand Down
6 changes: 5 additions & 1 deletion scss/core/_root.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
:root,
[data-bs-theme="light"] {

@each $color, $value in $all-colors {
--#{$prefix}#{$color}: #{$value};
}

// Logo
.logo-light {
display: none;
Expand Down Expand Up @@ -34,7 +39,6 @@
--#{$prefix}btn-hover-bg: var(--#{$prefix}gray-700);
--#{$prefix}btn-hover-color: var(--#{$prefix}white);
--#{$prefix}btn-hover-border-color: var(--#{$prefix}gray-700);
// --#{$prefix}btn-hover-color: #{color-contrast($dark)};
}
}
}
2 changes: 1 addition & 1 deletion scss/extra.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Webpixels CSS v2.0.0-beta.12 (https://webpixels.io/)
* Webpixels CSS v2.0.0-beta.13 (https://webpixels.io/)
* Copyright 2023 Webpixels
* Licensed under MIT (https://github.com/webpixels/css/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion scss/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Webpixels CSS v2.0.0-beta.12 (https://webpixels.io/)
* Webpixels CSS v2.0.0-beta.13 (https://webpixels.io/)
* Copyright 2023 Webpixels
* Licensed under MIT (https://github.com/webpixels/css/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Webpixels CSS v2.0.0-beta.12 (https://webpixels.io/)
* Webpixels CSS v2.0.0-beta.13 (https://webpixels.io/)
* Copyright 2023 Webpixels
* Licensed under MIT (https://github.com/webpixels/css/blob/main/LICENSE)
*/
Expand Down
2 changes: 1 addition & 1 deletion scss/utilities/_gradient.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// options to pass to the utility API
//

@if(map-get($theme, gradient, disable) != true) {
@if($enable-gradient-utilities == true) {
.gradient-top {
background-image: linear-gradient(to top, var(--#{$prefix}gradient)) !important;
}
Expand Down
7 changes: 7 additions & 0 deletions scss/utilities/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ $utilities: map-merge($utilities, (
"border-style": (
css-var: true,
css-variable-name: border-style,
// property: border-style,
class: border,
values: solid dashed dotted none
),
Expand Down Expand Up @@ -396,6 +397,12 @@ $utilities: map-merge($utilities, (
responsive: true
),
),
"z-index": map-merge(
map-get($utilities, "z-index"),
(
state: hover
),
),
"scroll-behaviour": (
property: scroll-behaviour,
class: scroll,
Expand Down
2 changes: 1 addition & 1 deletion scss/utility.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// /*!
// * Webpixels CSS v2.0.0-beta.12 (https://webpixels.io/)
// * Webpixels CSS v2.0.0-beta.13 (https://webpixels.io/)
// * Copyright 2023 Webpixels
// * Licensed under MIT (https://github.com/webpixels/css/blob/main/LICENSE)
// */
Expand Down
36 changes: 14 additions & 22 deletions scss/variables/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

@import '../core/colors';

// Theme object init
$theme: () !default;
$theme-utilities: () !default;

// Options
//
// Quickly modify global styling by enabling or disabling optional features.
Expand All @@ -27,7 +23,10 @@ $enable-rfs: true !default;
$enable-validation-icons: true !default;
$enable-negative-margins: true !default;
$enable-deprecation-messages: true !default;
$enable-important-utilities: false !default;
$enable-important-utilities: true !default;

// added in wpx
$enable-gradient-utilities: true !default;

// Prefix for :root CSS variables
$prefix: x- !default;
Expand All @@ -50,7 +49,7 @@ $bg-tint-level: 15% !default;
// Settings for the `<body>` element.

$body-bg: $white !default;
$body-color: $gray-800 !default;
$body-color: $gray-700 !default;

$body-secondary-color: rgba($body-color, .75) !default;
$body-secondary-bg: $gray-100 !default;
Expand Down Expand Up @@ -681,36 +680,29 @@ $dropdown-left-offset: 50% !default;
$dropdown-padding-x: .5rem !default;
$dropdown-padding-y: .5rem !default;
$dropdown-spacer: .125rem !default;
$dropdown-bg: $white !default;
$dropdown-border-width: 1px !default;
$dropdown-border-color: lighten($gray-200, 3%) !default;
$dropdown-border-radius: $border-radius-xl !default;
$dropdown-border-width: $border-width !default;
$dropdown-divider-bg: tint-color($dropdown-border-color, 10%) !default;
$dropdown-color: var(--#{$prefix}body-color) !default;
$dropdown-bg: var(--#{$prefix}body-bg) !default;
$dropdown-border-color: var(--#{$prefix}border-color) !default;
$dropdown-border-radius: var(--#{$prefix}border-radius-lg) !default;
$dropdown-divider-bg: var(--#{$prefix}border-color) !default;
$dropdown-divider-margin-y: $dropdown-padding-y !default;
$dropdown-box-shadow: $box-shadow-2xl !default;
$dropdown-font-size: $font-size-sm !default;

$dropdown-secondary-bg: $gray-100 !default;
$dropdown-secondary-bg: var(--#{$prefix}secondary-bg) !default;

$dropdown-heading-color: $gray-900 !default;
$dropdown-heading-color: var(--#{$prefix}heading-color) !default;
$dropdown-heading-font-size: $font-size-base !default;
$dropdown-heading-font-weight: $font-weight-semibold !default;
$dropdown-heading-focus-color: $primary !default;

$dropdown-helper-color: $text-muted !default;

$dropdown-link-border-radius: $border-radius !default;
$dropdown-link-color: $gray-900 !default;
$dropdown-link-bg: $white !default;
$dropdown-link-hover-color: $gray-900 !default;
$dropdown-link-hover-bg: $gray-100 !default;
$dropdown-link-active-color: $primary !default;
$dropdown-link-active-bg: transparent !default;
$dropdown-link-border-radius: var(--#{$prefix}border-radius-lg) !default;

$dropdown-item-padding-y: .5rem !default;
$dropdown-item-padding-x: 1rem !default;
$dropdown-item-border-radius: $border-radius !default;
$dropdown-item-border-radius: var(--#{$prefix}border-radius-lg) !default;

// Frames

Expand Down

0 comments on commit 5e5a94e

Please sign in to comment.