Skip to content

Commit

Permalink
Features/131 (#65)
Browse files Browse the repository at this point in the history
* BREAKING CHANGE rename margin effect

* switch to stylelintrc

* fix appling stylelint rules

* chore

* fixing stylelint rules

* doc: update demo page for grids and colors

* chore

* BREAKING CHANGE rename margin effect

* BREAKING CHANGE change margin et padding classes

* BREAKING CHANGE rename special icons for nav, collapse, dropdown

* fix some fixes after linter

* fix select background default color in darkmode

* fix lint and update doc

* added linter to build jobs

* fix workflow

* fix  avoid -internal-autofill-selected" style

* fix class naming conflic for margin

* update dist files

* update js plugin

* fix safari media queries removed browserlist handling

* Revert "fix safari media queries removed browserlist handling"

This reverts commit b7ed2cb.

* fix media queries screen unattended min max transformation

* doc add pkg dynamic version

* doc add more responsive example

* fix same browser list support for demo and lib

* chore

* doc update dev instructions

* update dist files

* doc fix minified html code example

---------

Co-authored-by: medevod <medevod@github.com>
  • Loading branch information
medevod and medevod authored Oct 25, 2024
1 parent 5e1e0f1 commit ce087a7
Show file tree
Hide file tree
Showing 75 changed files with 775 additions and 5,015 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/azure-cdn-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-beta-${{ github.event.pull_request.number }}"
run: |
npm install
npm run lint
npm run build
npm run build_demo
npm run build:demo
npm run test --if-present
- name: azure login
uses: azure/login@v1
Expand Down Expand Up @@ -85,9 +86,10 @@ jobs:
env:
PACKAGE_VERSION: "v${{ steps.package-version.outputs.current-version}}-preview"
run: |
npm install
npm install
npm run lint
npm run build
npm run build_demo
npm run build:demo
npm run test --if-present
- name: azure login
uses: azure/login@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
app_location: "." # App source code path
api_location: "" # Api source code path - optional
output_location: "./demo_build" # Built app content directory - optional
app_build_command: "npm run build_demo"
app_build_command: "npm run build:demo"
###### End of Repository/Build Configurations ######

build_deploy_rc:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
app_location: "." # App source code path
api_location: "" # Api source code path - optional
output_location: "./demo_build" # Built app content directory - optional
app_build_command: "npm run build_demo"
app_build_command: "npm run build:demo"
###### End of Repository/Build Configurations ######

build_deploy_release:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
app_location: "." # App source code path
api_location: "" # Api source code path - optional
output_location: "./demo_build" # Built app content directory - optional
app_build_command: "npm run build_demo"
app_build_command: "npm run build:demo"
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,5 @@ yarn.lock
node_modules
demo_build
demo_temp
dist/*.map
dist/*.map
.env
28 changes: 14 additions & 14 deletions .htmlnanorc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"collapseAttributeWhitespace": false,
"collapseBooleanAttributes": false,
"collapseWhitespace": "conservative",
"custom": [],
"deduplicateAttributeValues": false,
"mergeScripts": false,
"mergeStyles": false,
"removeUnusedCss": false,
"minifyJson": true,
"minifySvg": true,
"removeEmptyAttributes": false,
"removeRedundantAttributes": false,
"removeComments": true
}
"collapseAttributeWhitespace": false,
"collapseBooleanAttributes": false,
"collapseWhitespace": "conservative",
"custom": [],
"deduplicateAttributeValues": false,
"mergeScripts": false,
"mergeStyles": false,
"removeUnusedCss": false,
"minifyJson": true,
"minifySvg": true,
"removeEmptyAttributes": false,
"removeRedundantAttributes": false,
"removeComments": true
}
5 changes: 3 additions & 2 deletions .parcelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"extends": "@parcel/config-default",
"transformers": {
"*.css": [
"@plasmohq/parcel-transformer-inject-env",
"@parcel/transformer-css"
],
"*.html": [
"@plasmohq/parcel-transformer-inject-env",
"..."
"...",
"@plasmohq/parcel-transformer-inject-env"
]
}
}
74 changes: 0 additions & 74 deletions .sasslintrc

This file was deleted.

16 changes: 16 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "stylelint-config-standard-scss",
"rules": {
"selector-class-pattern": [
"^[a-z][a-z0-9]*(-{1,2}[a-z0-9]+)*$",
{
"message": "Expected class selector to be kebab-case or -- modifier"
}
],
"property-no-vendor-prefix": null,
"scss/operator-no-unspaced": null,
"unit-allowed-list": ["rem", "%", "deg", "s", "vw", "vh"],
"max-nesting-depth": 3,
"selector-max-id": 0
}
}
3 changes: 3 additions & 0 deletions demo/images/night-fog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions demo/images/screen-l.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions demo/images/screen-m.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions demo/images/screen-s.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions demo/images/screen-xl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions demo/images/sun-fog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions demo/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ header {
.svg-icon-github {
background-image: url("images/github.svg");
}
.svg-icon-night {
background-image: url("images/night-fog.svg");
}
.svg-icon-sun {
background-image: url("images/sun-fog.svg");
}

.svg-icon-screen-s {
background-image: url("images/screen-s.svg");
}
.svg-icon-screen-m {
background-image: url("images/screen-m.svg");
}
.svg-icon-screen-l {
background-image: url("images/screen-l.svg");
}
.svg-icon-screen-xl {
background-image: url("images/screen-xl.svg");
}

.grid-cel {
font-weight: bold;
Expand Down
16 changes: 9 additions & 7 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>MgPlus | A micro CSS library.</title>
<link rel="icon" href="./images/logo.svg" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic" />
<link rel="stylesheet" href="../dist/css/mgplus.css" />
<link rel="stylesheet" href="../src/scss/mgplus.scss" />
<link rel="stylesheet" href="./index.css" />
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/skins/sunburst.css" />
Expand All @@ -19,10 +19,10 @@
<body>
<header>
<nav class="mg-fixed-top mg-w100">
<div class="mg-container mg-row mg-x--middle mg-x--between mg-pad-t1">
<div class="mg-container mg-row mg-x--middle mg-x--between mg-p-t1">
<div class="mg-group">
<div class="mg-dropdown">
<button title="theme-switcher" data-toggle="dropdown" class="mg-button--small mg-dropdown--icon">
<button title="theme-switcher" data-toggle="dropdown" class="mg-button--small mg-icon-dropdown">
<i class="mg-icon svg-icon-darkmode"></i>
</button>
<div class="mg-dropdown--content">
Expand All @@ -36,10 +36,10 @@
</div>
</div>
<div class="mg-dropdown">
<button title="controls" data-toggle="dropdown" class="mg-button--small mg-dropdown--icon">
<button title="controls" data-toggle="dropdown" class="mg-button--small mg-icon-dropdown">
<i class="mg-icon svg-icon-gears"></i>
</button>
<div class="mg-dropdown--content mg-pad-r3 mg-pad-l1">
<div class="mg-dropdown--content mg-p-r3 mg-p-l1">
<div class="mg-col mg-x--start">
<label for="range2">Control radius</label>
<input type="range" min="0" max="20" value="2" id="control-radius-selector" />
Expand All @@ -49,7 +49,7 @@
</div>
</div>
<div class="mg-dropdown">
<button title="color-picker" data-toggle="dropdown" class="mg-button--small mg-dropdown--icon">
<button title="color-picker" data-toggle="dropdown" class="mg-button--small mg-icon-dropdown">
<i class="mg-icon svg-icon-colors"></i>
</button>
<div class="mg-dropdown--content">
Expand All @@ -72,9 +72,11 @@
<img alt="logo" class="logo-animation" src="./images/logo.svg" height="120" />
<div class="mg-light">
<h1 class="mg-text-bolder">Mg+</h1>
<h2>A micro CSS library <span class="mg-text-m mg-badge"> $PACKAGE_VERSION</span></h2>
<h2>A micro CSS library <span class="mg-text-m mg-badge">$PACKAGE_VERSION</span></h2>
<h3>Build pretty websites with just a few drops of CSS</h3>
<a class="mg-button" href="#getting-started">Getting started</a>
<a id="download_button" data-last-cdn-uri="https://cdn.mgpluscss.com/$PACKAGE_VERSION/css/mgplus.css"
class="mg-button" download="cdn">Download</a>
<a class="mg-button" href="https://github.com/mgpluscss/mgplus">Github <i class="mg-icon svg-icon-github"></i></a>


Expand Down
7 changes: 6 additions & 1 deletion demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ async function loadDemoSections() {
navLink.innerHTML = `<a href="#${section.id}">${navLinkTitle.innerText}</a>`;
navLinks.appendChild(navLink);
}
const download_button = document.getElementById("download_button");

//workaround to set the package version, this should be done in the build process
const dataLastCdnUri = download_button.getAttribute("data-last-cdn-uri");
download_button.setAttribute("href", dataLastCdnUri);
}

function registerDemoFeatures() {
Expand Down Expand Up @@ -109,7 +114,7 @@ function registerDemoFeatures() {
"mg-button--clear",
"mg-button--primary",
"mg-button--small",
"mg-dropdown--icon",
"mg-icon-dropdown",
"mg-collapse"
);

Expand Down
6 changes: 3 additions & 3 deletions demo/sections/collapse-section.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ <h2>Collapse</h2>
functionality.</p>
<i>Collapse needs js plugin</i>
<div class="mg-col mg-m6" id="collapse-example" data-toggle="htmlpreview">
<button class="mg-button mg-button--outline mg-collapse mg-collapse--icon" data-toggle="collapse">collapse
<button class="mg-button mg-button--outline mg-collapse mg-icon-collapse" data-toggle="collapse">collapse
Button</button>
<div class="mg-collapse--content">
Content 1
</div>
<span class="mg-collapse mg-collapse--icon" data-toggle="collapse">Collapse div</span>
<span class="mg-collapse mg-icon-collapse" data-toggle="collapse">Collapse div</span>
<div class="mg-collapse--content">
Content 2
</div>
Expand All @@ -21,7 +21,7 @@ <h3>Collapsible navs</h3>
<ul>
<li class="active"><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li class="mg-collapse mg-collapse--icon" data-toggle="collapse"><a href="#contact">Contact</a>
<li class="mg-collapse mg-icon-nav" data-toggle="collapse"><a href="#contact">Contact</a>
</li>
<ul class="mg-collapse--content">
<li>Contact sales</li>
Expand Down
Loading

0 comments on commit ce087a7

Please sign in to comment.