Compare commits

..

9 commits

Author SHA1 Message Date
Roni Laukkarinen
57d42c65ac Quick fix for a PHP warning, filemtime fails because it has an URL instead of path 2025-07-17 19:41:26 +03:00
Roni Laukkarinen
4b7093700f Fix: Block styles not currently covered, Fixes #1 2025-02-21 21:30:07 +02:00
Roni Laukkarinen
af0aaca90f Improvements for Yoast SEO 2025-02-21 21:24:15 +02:00
Roni Laukkarinen
5c8484e340 Fixes to Simple History dashboard widget 2025-02-21 21:13:38 +02:00
Roni Laukkarinen
d0834efabd Fixes for Gutenberg and wp-admin styles 2025-02-21 21:10:56 +02:00
Roni Laukkarinen
efd06e8e0b Release 1.0.8, ActivityPub support, fix load order, add composer.json 2025-02-21 20:42:08 +02:00
Roni Laukkarinen
47496f3e33 Unset backdrop background required by #5 2024-06-23 16:37:26 +03:00
Roni Laukkarinen
5053f119b6 Patch update for compiled styles 2024-06-23 16:27:58 +03:00
Roni Laukkarinen
6af5aa5cca Force the text fill for number inputs as white instead of using a variable, Finally fixes #5 2024-06-23 16:23:53 +03:00
20 changed files with 788 additions and 560 deletions

1
.stylelintignore Normal file
View file

@ -0,0 +1 @@
**/*.css

View file

@ -41,69 +41,26 @@
"alpha-value-notation": "number",
"declaration-block-no-redundant-longhand-properties": null,
"custom-property-empty-line-before": "never",
"block-closing-brace-empty-line-before": "never",
"property-case": "lower",
"color-no-invalid-hex": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"selector-pseudo-element-case": "lower",
"selector-type-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"function-parentheses-space-inside": "never",
"function-comma-newline-after": "never-multi-line",
"function-name-case": "lower",
"function-max-empty-lines": 0,
"max-empty-lines": 1,
"unit-case": "lower",
"selector-pseudo-class-case": "lower",
"value-keyword-case": "lower",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-quotes": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"comment-whitespace-inside": "always",
"indentation": 2,
"linebreaks": "unix",
"selector-max-specificity": "2,6,6",
"block-no-empty": true,
"declaration-colon-newline-after": null,
"declaration-empty-line-before": null,
"number-leading-zero": "never",
"number-no-trailing-zeros": true,
"value-list-comma-newline-after": "never-multi-line",
"selector-list-comma-newline-after": "always",
"declaration-colon-space-before": "never",
"declaration-block-trailing-semicolon": "always",
"no-eol-whitespace": true,
"no-empty-first-line": true,
"no-missing-end-of-source-newline": true,
"block-opening-brace-newline-after": "always",
"block-closing-brace-newline-after": "always-multi-line",
"string-quotes": null,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "never-multi-line",
"media-feature-name-case": "lower",
"font-family-no-missing-generic-family-keyword": true,
"font-family-name-quotes": "always-where-required",
"at-rule-no-unknown": null,
"no-invalid-position-at-import-rule": null,
"declaration-no-important": null,
"comment-empty-line-before": null,
"at-rule-name-newline-after": null,
"at-rule-semicolon-newline-after": null,
"at-rule-semicolon-space-before": "never",
"at-rule-name-space-after": "always",
"at-rule-name-case": "lower",
"function-url-quotes": "always",
"unit-no-unknown": true,
"property-no-unknown": true,
"no-duplicate-selectors": true,
"no-extra-semicolons": true,
"length-zero-no-unit": true,
"font-weight-notation": "numeric",
"number-max-precision": 3,
@ -226,5 +183,11 @@
"animation",
"background"
]
}
},
"ignoreFiles": [
"**/*.css",
"**/**/*.css",
"css/dev/dark-mode.css",
"css/prod/dark-mode.css"
]
}

View file

@ -1,3 +1,29 @@
### 1.0.9: 2025-02-21

* Fix: Block styles not currently covered #1

### 1.0.8: 2025-02-21

* Add ActivityPub support
* Ensure the plugin styles are loaded last
* Add composer.json
* Remove lintstyles task from gulp
* Ignore css files in stylelint
* Fixes to Simple History dashboard widget
* Improvements for Yoast SEO

### 1.0.7: 2024-06-23

* Unset backdrop background required by #5

### 1.0.6: 2024-06-23

* Patch update for compiled styles

### 1.0.5: 2024-06-23

* Force the text fill for number inputs as white instead of using a variable, Finally fixes #5

### 1.0.4: 2024-06-23

* Fix text fill color

View file

@ -22,6 +22,7 @@ The theme tries to respect the original WordPress colors as much as possible.
- Advanced Custom Fields and Advanced Custom Field Pro
- Simple History
- Instant Images
- ActivityPub

## Development


File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -250,20 +250,20 @@ html.wp-toolbar:root .interface-interface-skeleton__secondary-sidebar,
html.wp-toolbar:root .interface-interface-skeleton__sidebar,
html.wp-toolbar:root .postbox,
html.wp-toolbar:root .postbox-header,
#wpbody .try-gutenberg-panel,
#wpwrap .try-gutenberg-panel,
.edit-post-post-link__preview-label,
#wpbody .welcome-panel,
#wpbody .postbox,
#wpwrap .welcome-panel,
#wpwrap .postbox,
.edit-post-layout__metaboxes:not(:empty),
.edit-post-layout__metaboxes,
#wpbody .card,
#wpwrap .card,
.components-button.editor-post-last-revision__title:active,
.components-button.editor-post-last-revision__title:hover,
#wpbody .stuffbox,
#wpbody #activity-widget #the-comment-list .comment-item,
#wpbody .community-events ul,
#wpbody .wp-filter,
#wpbody .menu-edit #post-body,
#wpwrap .stuffbox,
#wpwrap #activity-widget #the-comment-list .comment-item,
#wpwrap .community-events ul,
#wpwrap .wp-filter,
#wpwrap .menu-edit #post-body,
#wpfooter .try-gutenberg-panel,
#wpfooter .welcome-panel,
#wpfooter .postbox,
@ -273,102 +273,124 @@ html.wp-toolbar:root .postbox-header,
#wpfooter .community-events ul,
#wpfooter .wp-filter,
#wpfooter .menu-edit #post-body,
.postbox,
.components-text-control__input,
.components-text-control__input[type=color],
.components-text-control__input[type=date],
.components-text-control__input[type=datetime-local],
.components-text-control__input[type=datetime],
.components-text-control__input[type=email],
.components-text-control__input[type=month],
.components-text-control__input[type=number],
.components-text-control__input[type=password],
.components-text-control__input[type=tel],
.components-text-control__input[type=text],
.components-text-control__input[type=time],
.components-text-control__input[type=url],
.components-text-control__input[type=week],
.acf-fields > .acf-field,
.postbox-header,
.block-editor-block-contextual-toolbar,
.components-popover__content,
.components-panel__body,
.components-panel__body:hover,
.interface-interface-skeleton__header,
.block-editor-block-contextual-toolbar.is-fixed,
.block-editor-block-toolbar .components-toolbar,
.block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,
.block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group,
.block-editor-block-styles__item-preview,
.components-panel__body-toggle.components-button,
.edit-post-visual-editor__content-area > div,
.components-panel,
.interface-complementary-area-header,
.edit-post-header,
.block-editor-block-contextual-toolbar,
.editor-styles-wrapper,
.interface-complementary-area,
.interface-interface-skeleton__secondary-sidebar,
.media-frame-router,
.components-button.is-secondary:disabled,
.components-button.is-secondary[aria-disabled=true],
.components-button.is-secondary[aria-disabled=true]:hover,
.components-button.is-tertiary:disabled,
.components-button.is-tertiary[aria-disabled=true],
.components-button.is-tertiary[aria-disabled=true]:hover,
.components-popover.block-editor-block-switcher__popover .components-popover__content > div,
.components-toolbar,
.provider-nav,
.provider-nav--btn.active,
.provider-nav--btn.active:hover,
.provider-nav--btn,
.block-editor-block-inspector__no-blocks,
.block-editor-inserter__search,
.instant-img-container .load-more-wrap,
.instant-img-container .control-nav li.search-field input,
.block-editor-inserter__tabs .components-tab-panel__tabs,
.interface-interface-skeleton__sidebar,
.ui-sortable-handle,
.postbox.acf-postbox,
.postbox,
.postbox-header,
body.wp-admin #wpwrap .postbox,
body.wp-admin #wpwrap .components-text-control__input,
body.wp-admin #wpwrap .components-text-control__input[type=color],
body.wp-admin #wpwrap .components-text-control__input[type=date],
body.wp-admin #wpwrap .components-text-control__input[type=datetime-local],
body.wp-admin #wpwrap .components-text-control__input[type=datetime],
body.wp-admin #wpwrap .components-text-control__input[type=email],
body.wp-admin #wpwrap .components-text-control__input[type=month],
body.wp-admin #wpwrap .components-text-control__input[type=number],
body.wp-admin #wpwrap .components-text-control__input[type=password],
body.wp-admin #wpwrap .components-text-control__input[type=tel],
body.wp-admin #wpwrap .components-text-control__input[type=text],
body.wp-admin #wpwrap .components-text-control__input[type=time],
body.wp-admin #wpwrap .components-text-control__input[type=url],
body.wp-admin #wpwrap .components-text-control__input[type=week],
body.wp-admin #wpwrap .acf-fields > .acf-field,
body.wp-admin #wpwrap .postbox-header,
body.wp-admin #wpwrap .block-editor-block-contextual-toolbar,
body.wp-admin #wpwrap .components-popover__content,
body.wp-admin #wpwrap .components-panel__body,
body.wp-admin #wpwrap .components-panel__body:hover,
body.wp-admin #wpwrap .interface-interface-skeleton__header,
body.wp-admin #wpwrap .block-editor-block-contextual-toolbar.is-fixed,
body.wp-admin #wpwrap .block-editor-block-toolbar .components-toolbar,
body.wp-admin #wpwrap .block-editor-block-toolbar .components-toolbar-group,
body.wp-admin #wpwrap .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar,
body.wp-admin #wpwrap .block-editor-block-contextual-toolbar.is-fixed .block-editor-block-toolbar .components-toolbar-group,
body.wp-admin #wpwrap .block-editor-block-styles__item-preview,
body.wp-admin #wpwrap .components-panel__body-toggle.components-button,
body.wp-admin #wpwrap .edit-post-visual-editor__content-area > div,
body.wp-admin #wpwrap .components-panel,
body.wp-admin #wpwrap .interface-complementary-area-header,
body.wp-admin #wpwrap .edit-post-header,
body.wp-admin #wpwrap .block-editor-block-contextual-toolbar,
body.wp-admin #wpwrap .editor-styles-wrapper,
body.wp-admin #wpwrap .interface-complementary-area,
body.wp-admin #wpwrap .interface-interface-skeleton__secondary-sidebar,
body.wp-admin #wpwrap .media-frame-router,
body.wp-admin #wpwrap .components-button.is-secondary:disabled,
body.wp-admin #wpwrap .components-button.is-secondary[aria-disabled=true],
body.wp-admin #wpwrap .components-button.is-secondary[aria-disabled=true]:hover,
body.wp-admin #wpwrap .components-button.is-tertiary:disabled,
body.wp-admin #wpwrap .components-button.is-tertiary[aria-disabled=true],
body.wp-admin #wpwrap .components-button.is-tertiary[aria-disabled=true]:hover,
body.wp-admin #wpwrap .components-popover.block-editor-block-switcher__popover .components-popover__content > div,
body.wp-admin #wpwrap .components-toolbar,
body.wp-admin #wpwrap .provider-nav,
body.wp-admin #wpwrap .provider-nav--btn.active,
body.wp-admin #wpwrap .provider-nav--btn.active:hover,
body.wp-admin #wpwrap .provider-nav--btn,
body.wp-admin #wpwrap .block-editor-block-inspector,
body.wp-admin #wpwrap .block-editor-block-inspector__no-blocks,
body.wp-admin #wpwrap .block-editor-inserter__search,
body.wp-admin #wpwrap .instant-img-container .load-more-wrap,
body.wp-admin #wpwrap .instant-img-container .control-nav li.search-field input,
body.wp-admin #wpwrap .block-editor-inserter__tabs .components-tab-panel__tabs,
body.wp-admin #wpwrap .interface-interface-skeleton__sidebar,
body.wp-admin #wpwrap .ui-sortable-handle,
body.wp-admin #wpwrap .postbox.acf-postbox,
body.wp-admin #wpwrap .postbox,
body.wp-admin #wpwrap .editor-sidebar__panel input,
body.wp-admin #wpwrap .block-editor-block-card *,
body.wp-admin #wpwrap .postbox-header,
#wpseo_meta,
.wpseo-metabox-content button,
.wpseo-metabox-content div,
.wpseo-metabox-content input,
.wpseo-metabox-content textarea,
#wpseo-metabox-root div,
.interface-complementary-area .components-panel__header,
.components-base-control div,
.orientation-list,
.block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter > *,
.acf-block-component,
.acf-block-fields,
.acf-field-object,
.filter-dropdown--menu,
.filter-dropdown--menu.expanded,
.acf-fields,
.acf-block-component div,
.instant-img-container .control-nav,
.acf-block-component input,
.acf-button-group label:not(.selected),
.block-editor-inserter__quick-inserter-results,
.acf-relationship,
.acf-relationship .filters,
.acf-relationship .filters .filter,
.components-input-control__container select,
body #wpbody-content .filters,
body #wpbody-content .selection,
body #wpbody-content .choices,
body #wpbody-content .values,
body .filters,
body .selection,
body .choices,
body .values,
body .acf-relationship .selection .values,
body .acf-relationship .selection .choices,
body .acf-relationship .list,
body.wp-admin #wpwrap .interface-complementary-area .components-panel__header::after,
body.wp-admin #wpwrap .interface-complementary-area .components-panel__header,
body.wp-admin #wpwrap .components-base-control div,
body.wp-admin #wpwrap .orientation-list,
body.wp-admin #wpwrap .block-editor-inserter__popover.is-quick .components-popover__content .block-editor-inserter__quick-inserter > *,
body.wp-admin #wpwrap .acf-block-component,
body.wp-admin #wpwrap .acf-block-fields,
body.wp-admin #wpwrap .acf-field-object,
body.wp-admin #wpwrap .filter-dropdown--menu,
body.wp-admin #wpwrap .filter-dropdown--menu.expanded,
body.wp-admin #wpwrap .acf-fields,
body.wp-admin #wpwrap .acf-block-component div,
body.wp-admin #wpwrap .instant-img-container .control-nav,
body.wp-admin #wpwrap .acf-block-component input,
body.wp-admin #wpwrap .acf-button-group label:not(.selected),
body.wp-admin #wpwrap .block-editor-inserter__quick-inserter-results,
body.wp-admin #wpwrap .acf-relationship,
body.wp-admin #wpwrap .acf-relationship .filters,
body.wp-admin #wpwrap .acf-relationship .filters .filter,
body.wp-admin #wpwrap .components-input-control__container select,
body.wp-admin #wpbody-content .filters,
body.wp-admin #wpbody-content .selection,
body.wp-admin #wpbody-content .choices,
body.wp-admin #wpbody-content .values,
body.wp-admin #wpwrap .filters,
body.wp-admin #wpwrap .selection,
body.wp-admin #wpwrap .choices,
body.wp-admin #wpwrap .values,
body.wp-admin #wpwrap [role="radiogroup"],
body.wp-admin #wpwrap [role="radiogroup"] *,
body.wp-admin #wpwrap .editor-document-bar__post-type-label,
body.wp-admin #wpwrap .editor-document-bar__shortcut,
body.wp-admin #wpwrap .editor-document-bar,
body.wp-admin #wpwrap .editor-document-bar .components-button,
body.wp-admin #wpwrap .editor-sidebar__panel-tabs *,
body.wp-admin #wpwrap .components-flex label,
body.wp-admin #wpwrap .components-flex span,
body.wp-admin #wpwrap span.components-text,
body.wp-admin .components-flex *,
body.wp-admin #wpwrap [role="tablist"] button,
body.wp-admin #wpwrap .acf-relationship .selection .values,
body.wp-admin #wpwrap .acf-relationship .selection .choices,
body.wp-admin #wpwrap .acf-relationship .list,
body.wp-admin #wpwrap .components-dropdown button,
body.wp-admin #wpwrap .components-dropdown *,
body.wp-admin .block-editor-media-placeholder,
body.wp-admin .wp-block .components-placeholder,
body.wp-admin .wp-block .components-placeholder.block-editor-media-placeholder,
body.wp-admin #wpwrap .block-editor-tools-panel-color-gradient-settings__item,
#wpseo-metabox-root div div {
background-color: var(--color-background-default) !important;
border-color: var(--color-border-light) !important;
@ -376,11 +398,24 @@ body .acf-relationship .list,
color: var(--color-paragraph) !important;
}

body.wp-admin #wpwrap .editor-document-bar .components-button:hover,
body.wp-admin #wpwrap .editor-document-bar .components-button:focus,
body.wp-admin #wpwrap .editor-document-bar:hover,
body.wp-admin #wpwrap .editor-document-bar:focus {
background-color: var(--color-background-default) !important;
outline: 1px solid var(--color-border-light) !important;
}

.components-input-control__container select {
position: relative;
z-index: 3;
}

// Reset some font-sizes
body.wp-admin #wpwrap .editor-sidebar__panel p {
font-size: 16px !important;
}

.auto-fold #adminmenu li.menu-top .wp-submenu > li > a,
.ab-icon::before,
.ab-item,
@ -393,17 +428,17 @@ body .acf-relationship .list,
}

.auto-fold #adminmenu .wp-menu-name,
#wpbody p,
#wpbody code,
#wpbody kbd,
#wpbody label,
#wpbody .form-table th,
#wpbody .form-wrap label,
#wpbody .form-wrap p,
#wpbody p.description,
#wpbody .importer-title,
#wpbody .menu-in-location,
#wpbody .theme-location-set,
#wpwrap p,
#wpwrap code,
#wpwrap kbd,
#wpwrap label,
#wpwrap .form-table th,
#wpwrap .form-wrap label,
#wpwrap .form-wrap p,
#wpwrap p.description,
#wpwrap .importer-title,
#wpwrap .menu-in-location,
#wpwrap .theme-location-set,
#wpfooter p,
#wpfooter code,
#wpfooter kbd,

View file

@ -1577,9 +1577,9 @@ body.wp-admin:not(.gutenberg-editor-page) {
// Autocomplete inputs
input[type="number"] {
/* stylelint-disable-next-line */
-webkit-text-fill-color: var(--color-white) !important;
-webkit-text-fill-color: #fff !important;
/* stylelint-disable-next-line */
text-fill-color: var(--color-white) !important;
text-fill-color: #fff !important;
}

.button,
@ -1826,3 +1826,9 @@ textarea.readonly,
textarea[readonly] {
background-color: var(--color-dark-grey);
}

/* stylelint-disable-next-line */
body .block-editor-publish-date-time-picker .components-input-control__container .components-input-control__backdrop {
/* stylelint-disable-next-line */
background: unset !important;
}

View file

@ -2,8 +2,11 @@
@import 'variables';
@import 'admin';
@import 'main';
@import 'acf';
@import 'gutenberg';

// Plugins
@import 'plugins/yoast-seo';
@import 'plugins/simple-history';
@import 'plugins/koko-analytics';
@import 'acf';
@import 'gutenberg';
@import 'plugins/activitypub';

View file

@ -0,0 +1,27 @@
.activitypub-settings-accordion,
.activitypub-settings-accordion *,
.activitypub-settings-accordion h4,
.activitypub-settings-accordion-panel,
.activitypub-settings-header,
.activitypub-settings-accordion-trigger,
#activitypub-settings-accordion-block-friends-plugin,
.activitypub-settings-accordion-heading,
.activitypub-visibility *,
body .css-bc6pwz,
body.wp-admin.settings_page_activitypub #wpcontent .plugin-card-friends,
body.wp-admin.settings_page_activitypub #wpcontent .box {
/* stylelint-disable-next-line */
background: var(--color-dark-grey) !important;
background-color: var(--color-dark-grey) !important;
border-color: var(--color-border-light) !important;
color: var(--color-paragraph) !important;
}

.activitypub-settings-accordion-heading {
border-top: 1px solid var(--color-border-light) !important;
}

.activitypub-visibility svg,
body.wp-admin .activitypub-visibility svg {
fill: var(--color-paragraph) !important;
}

View file

@ -17,3 +17,12 @@
background-color: var(--color-border-light) !important;
}
}

body.wp-admin #simple_history_dashboard_widget *,
body.wp-admin #simple_history_dashboard_widget .postbox,
body.wp-admin #simple_history_dashboard_widget div,
body.wp-admin #simple_history_dashboard_widget div div {
background-color: var(--color-dark-grey) !important;
color: var(--color-paragraph) !important;
border-color: var(--color-border-light) !important;
}

View file

@ -1,4 +1,40 @@
body.wp-admin:not(.gutenberg-editor-page) .yst-root .yst-sidebar-navigation__item--active.yst-sidebar-navigation__collapsible-button,
body.wp-admin:not(.gutenberg-editor-page) .yst-root .yst-sidebar-navigation__item--active.yst-sidebar-navigation__link,
body.wp-admin:not(.gutenberg-editor-page) .yst-paper,
body.wp-admin:not(.gutenberg-editor-page) #yoast-seo-general div,
body.wp-admin:not(.gutenberg-editor-page) .yst-root .yst-paper {
background-color: var(--color-dark-grey) !important;
color: var(--color-paragraph) !important;
border-color: var(--color-border-light) !important;
box-shadow: none !important;
}

body #wpwrap .yst-label,
body #wpwrap span.yst-label,
body #wpwrap .yst-grow *,
body #wpwrap .yst-grow span,
body #wpwrap .yst-grow label,
body #wpwrap .yst-grow input,
body #wpwrap .yst-grow textarea,
body #wpwrap .yst-grow li,
body #wpwrap .yst-root .yst-paper * {
color: var(--color-paragraph) !important;
}

/* Buttons */
.yst-root .yst-badge--plain
body .yst-root .yst-badge--plain,
body #wpwrap .yst-badge,
body #wpwrap .yst-badge--plain,
body #wpwrap .yst-button {
background-color: var(--color-primary) !important;
border-color: var(--color-primary) !important;
color: var(--color-light-grey) !important;
}


body.wp-admin:not(.gutenberg-editor-page) {

#yoast-seo-dashboard-widget .wordpress-feed .wordpress-feed__footer,
#yoast-seo-dashboard-widget .wordpress-feed {
// stylelint-disable-next-line

28
composer.json Normal file
View file

@ -0,0 +1,28 @@
{
"name": "ronilaukkarinen/simple-dark-mode-for-wp-dashboard",
"type": "wordpress-plugin",
"description": "The simplest way to make your WordPress Dashboard dark. No settings, just activate the plugin and enjoy the darkness.",
"homepage": "https://github.com/ronilaukkarinen/simple-dark-mode-for-wp-dashboard",
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Roni Laukkarinen",
"email": "roni@dude.fi",
"homepage": "https://github.com/ronilaukkarinen"
}
],
"require": {
"php": ">=8.3",
"composer/installers": "^2.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"wp-coding-standards/wpcs": "^3.0"
},
"config": {
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

View file

@ -13,34 +13,33 @@ module.exports = {
level: {
1: {
optimizeFont: false,
optimizeFontWeight: true,
optimizeOutline: true,
optimizeFontWeight: false,
optimizeOutline: false,
specialComments: false,
removeQuotes: false,
removeWhitespace: true,
removeEmpty: true,
tidyAtRules: true,
tidyBlockScopes: true,
tidySelectors: true,
cleanupCharsets: true,
replaceMultipleZeros: true,
selectorsSortingMethod: 'standard'
removeWhitespace: false,
removeEmpty: false,
tidyAtRules: false,
tidyBlockScopes: false,
tidySelectors: false,
cleanupCharsets: false,
replaceMultipleZeros: false,
},
2: {
mergeAdjacentRules: true,
mergeIntoShorthands: true,
mergeAdjacentRules: false,
mergeIntoShorthands: false,
mergeMedia: false,
mergeNonAdjacentRules: true,
mergeSemantically: true,
overrideProperties: true,
removeEmpty: true,
removeDuplicateRules: true,
reduceNonAdjacentRules: true,
removeDuplicateFontRules: true,
removeDuplicateMediaBlocks: true,
mergeNonAdjacentRules: false,
mergeSemantically: false,
overrideProperties: false,
removeEmpty: false,
removeDuplicateRules: false,
reduceNonAdjacentRules: false,
removeDuplicateFontRules: false,
removeDuplicateMediaBlocks: false,
removeUnusedAtRules: false,
restructureRules: false,
urlQuotes: true
urlQuotes: false
}
}
}

View file

@ -18,7 +18,7 @@ const {
// Task
function watchfiles() {
bs.init(config.browsersync.src, config.browsersync.opts);
watch(config.styles.watch.development, series('devstyles', 'lintstyles')).on('error', handleError());
watch(config.styles.watch.development, series('devstyles')).on('error', handleError());
watch(config.styles.watch.production, series('prodstyles')).on('error', handleError());
};


View file

@ -1,5 +1,4 @@
// Export tasks
exports.lintstyles = require('./gulp/tasks/lintstyles.js').lintstyles;
exports.devstyles = require('./gulp/tasks/devstyles.js').devstyles;
exports.prodstyles = require('./gulp/tasks/prodstyles.js').prodstyles;
exports.watch = require('./gulp/tasks/watch.js').watch;

6
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "simple-dark-mode-for-wp-dashboard",
"version": "1.0.4",
"version": "1.0.9",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "simple-dark-mode-for-wp-dashboard",
"version": "1.0.1",
"version": "1.0.9",
"devDependencies": {
"@ronilaukkarinen/gulp-stylelint": "^14.0.5",
"@ronilaukkarinen/stylelint-a11y": "^1.2.4",
@ -19326,4 +19326,4 @@
"dev": true
}
}
}
}

View file

@ -1,6 +1,6 @@
{
"name": "simple-dark-mode-for-wp-dashboard",
"version": "1.0.4",
"version": "1.0.9",
"description": "The simplest way to make your WordPress Dashboard dark. No settings, just activate the plugin and enjoy the darkness. Tries to follow the WordPress Coding Standards and best practices and be as straightforward as possible.",
"author": "Roni Laukkarinen (roni@dude.fi)",
"devDependencies": {
@ -29,4 +29,4 @@
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.0.0"
}
}
}

View file

@ -16,28 +16,23 @@
-->
<arg value="psvn"/>

<!-- Only check the PHP, CSS and SCSS files. JS files are checked separately with JSCS and JSHint. -->
<arg name="extensions" value="php,css,scss/css"/>
<!-- Only check the PHP files. -->
<arg name="extensions" value="php"/>

<!-- Check all files in this directory and the directories below it. -->
<file>.</file>

<!-- Include the WordPress ruleset, with exclusions. -->
<rule ref="WordPress">

<!-- Nazi-strict intendation rules we want to exclude -->
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
<exclude name="WordPress.WhiteSpace.PrecisionAlignment" />
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned" />
<exclude name="WordPress.Arrays.ArrayIndentation.MultiLineArrayItemNotAligned" />
<exclude name="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed" />
<exclude name="WordPress.Arrays.ArrayIndentation.CloseBraceNotAligned" />
<exclude name="PEAR.Functions.FunctionCallSignature.OpeningIndent" />

<!-- Don't require too strict inline commenting, it's a good thing to documentate, let's not make it frustrating -->
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle" />
<exclude name="Squiz.Commenting.ClassComment.WrongStyle" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
@ -47,8 +42,6 @@
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />

<!-- General code style related excludes -->
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
<exclude name="Squiz.PHP.EmbeddedPhp.MultipleStatements" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen" />
@ -59,11 +52,7 @@
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace" />
<exclude name="PHPCompatibility.PHP.NewFunctionArrayDereferencing.Found" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />

<!-- General WordPress stuff we like to overrule -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />

<!-- Very strict VIP/discouraged rules that are not needed -->
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
<exclude name="WordPress.Functions.DontExtract.extract_extract" />
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
@ -75,18 +64,9 @@
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="WordPress.PHP.DontExtract.extract_extract" />
<exclude name="WordPress.PHP.DisallowShortTernary" />

<!-- Translations related, not always necessary, too strict -->
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />

<!-- EditorConfig makes sure this happens anyway & false positives happen with this -->
<exclude name="Generic.Files.EndFileNewline.NotFound" />

<!-- Many times when developing a customer case we have placeholders for SVG includes, so unnecessary error reports happen with this rule -->
<exclude name="Squiz.PHP.EmbeddedPhp.Empty" />

<!-- Project based -->
<exclude name="WordPress.DateTime.RestrictedFunctions" />
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<exclude name="WordPress.DB.PreparedSQL.NotPrepared" />
@ -101,6 +81,7 @@
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment" />
<exclude name="Generic.Formatting.MultipleStatementAlignment" />
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
</rule>

<!-- Verify that the text_domain is set to the desired text-domain.

View file

@ -6,7 +6,7 @@
* Author: Roni Laukkarinen
* Author URI: https://github.com/ronilaukkarinen
* Text Domain: dark-mode-dashboard
* Version: 1.0.4
* Version: 1.0.9
*
* @package dark-mode-dashboard
*/
@ -16,19 +16,23 @@ if ( ! defined( 'ABSPATH' ) ) {
}

// Define versions
define( 'SIMPLE_DARK_MODE_DASHBOARD_VERSION', '1.0.4' );
define( 'SIMPLE_DARK_MODE_DASHBOARD_VERSION', '1.0.9' );
define( 'SIMPLE_DARK_MODE_DASHBOARD_PLUGIN_PATH', plugin_dir_url( __FILE__ ) );
define( 'SIMPLE_DARK_MODE_DASHBOARD_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );

// Add styles to admin
function simple_dark_mode() {
// Dequeue plugin styles if needed
wp_dequeue_style( 'activitypub-admin' );

wp_enqueue_style(
'dark-mode',
SIMPLE_DARK_MODE_DASHBOARD_PLUGIN_PATH . '/assets/css/prod/dark-mode.css',
[],
filemtime( SIMPLE_DARK_MODE_DASHBOARD_PLUGIN_PATH . '/assets/css/prod/dark-mode.css' )
filemtime( SIMPLE_DARK_MODE_DASHBOARD_PLUGIN_DIR . '/assets/css/prod/dark-mode.css' )
);
}
add_action( 'admin_enqueue_scripts', 'simple_dark_mode' );
add_action( 'admin_enqueue_scripts', 'simple_dark_mode', 99999 );

// Plugin description when people click on View version details
add_filter( 'plugins_api', 'dark_mode_dashboard_plugin_view_version_details', 9999, 3 );