From f601599a43ec5b98f0f120dfe1375174d5aba7cb Mon Sep 17 00:00:00 2001 From: MaxOvs Date: Mon, 14 Nov 2022 18:46:01 +0300 Subject: [PATCH 1/2] Fixed media requests --- package.json | 8 ++++---- src/cg-dropdown.js | 3 +++ src/style/main.scss | 18 +++++++++++++++++- src/style/nativSelect.scss | 3 ++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8c21747..57d9ebc 100644 --- a/package.json +++ b/package.json @@ -3,21 +3,21 @@ "version": "0.0.1", "description": "", "scripts": { - "start": "parcel ./src/index.html -p 4500 --open ", + "start": "parcel src/index.html -p 4500 --open ", "build": "parcel build ./src/index.html --public-url /cg-select/", "deploy": "gh-pages -d dist", "predeploy": "npm run build" }, "repository": { "type": "git", - "url": "git+https://github.com/MaxOvs19/Cg-select.git" + "url": "git+https://github.com/MaxOvs19/cg-select.git" }, "author": "", "license": "ISC", "bugs": { - "url": "https://github.com/MaxOvs19/Cg-select/issues" + "url": "https://github.com/MaxOvs19/cg-select/issues" }, - "homepage": "https://github.com/MaxOvs19/Cg-select", + "homepage": "https://github.com/MaxOvs19/cg-select", "devDependencies": { "@parcel/transformer-sass": "^2.7.0", "parcel": "^2.7.0", diff --git a/src/cg-dropdown.js b/src/cg-dropdown.js index bc939e0..0043569 100644 --- a/src/cg-dropdown.js +++ b/src/cg-dropdown.js @@ -217,11 +217,14 @@ export class DropDown { } const select = this.#element.querySelector('.cg-select'); + const nativSelect = this.#element.querySelector('.nativSelect'); if (value === true) { this.#element.setAttribute('disabled', true); + nativSelect.setAttribute('disabled', true); select.classList.add('disabled'); } else { this.#element.removeAttribute('disabled'); + nativSelect.removeAttribute('disabled'); select.classList.remove('disabled'); } } diff --git a/src/style/main.scss b/src/style/main.scss index 7e5fb9b..cf366fa 100644 --- a/src/style/main.scss +++ b/src/style/main.scss @@ -322,7 +322,23 @@ input[type='checkbox'] { display: none; } -@media (max-width: 425px) { +/*320px - 576px*/ +@media (max-width: 576px) { + body { + margin: 0; + padding: 0; + } + + .container { + width: 90%; + + .header { + h1 { + font-size: 32px; + } + } + } + .list { display: none !important; } diff --git a/src/style/nativSelect.scss b/src/style/nativSelect.scss index cbdd06e..c8d4b8b 100644 --- a/src/style/nativSelect.scss +++ b/src/style/nativSelect.scss @@ -18,7 +18,7 @@ } } -@media (max-width: 425px) { +@media (max-width: 576px) { .nativSelect { display: block; min-width: 235px; @@ -27,6 +27,7 @@ border: none; border-radius: 10px; } + select[multiple='multiple'] { color: black; background-color: white; From 68273b2fa2a4fe16a866e845380011104487bc3b Mon Sep 17 00:00:00 2001 From: MaxOvs19 <88626313+MaxOvs19@users.noreply.github.com> Date: Mon, 14 Nov 2022 18:53:02 +0300 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 57d9ebc..c72db6f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "bugs": { "url": "https://github.com/MaxOvs19/cg-select/issues" }, - "homepage": "https://github.com/MaxOvs19/cg-select", + "homepage": "https://maxovs19.github.io/cg-select", "devDependencies": { "@parcel/transformer-sass": "^2.7.0", "parcel": "^2.7.0",