Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 041960e

Browse files
Merge pull request #404 from forumone/5.x-RC
5.2.1 release PR
2 parents 154c0c6 + 6b7fdba commit 041960e

File tree

6 files changed

+108
-100
lines changed

6 files changed

+108
-100
lines changed

package-lock.json

Lines changed: 18 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gesso-wp",
3-
"version": "5.2.0",
3+
"version": "5.2.1",
44
"description": "Gesso starter theme",
55
"main": "style.css",
66
"scripts": {
@@ -9,7 +9,8 @@
99
"dev": "npm run start && concurrently --raw \"webpack watch --config ./webpack.dev.js\" \"webpack watch --config ./webpack.theme-config.js\"",
1010
"rename": "node lib/rename.js",
1111
"eslint": "eslint -c .eslintrc.js \"**/*.es6.js\"",
12-
"stylelint": "stylelint \"source/**/*.scss\""
12+
"stylelint": "stylelint \"source/**/*.scss\"",
13+
"watch": "npm run dev"
1314
},
1415
"bugs": "https://github.com/forumone/gesso-wp/issues",
1516
"repository": {

source/01-global/html-elements/00-universal/_universal.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// HTML Element: Universal
22

3+
@use '00-config' as *;
4+
35
// Uncomment to add a set of default transitions to all elements
46
// * {
5-
// transition-duration: gesso-duration(short) ;
6-
// transition-property: background-color, border-color, box-shadow, color, opacity, text-shadow, transform;
7+
// transition-duration: gesso-duration(short);
8+
// transition-property: background-color, border-color, box-shadow, color,
9+
// opacity, text-shadow, transform;
710
// transition-timing-function: gesso-easing(ease-in);
811
// }
912

source/04-utility/_isPrintableCharacter.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @return {boolean} A true or false value.
66
*/
77
function isPrintableCharacter(str) {
8-
return str.length === 1 && str.match(/\S/);
8+
return str.length === 1 && str.match(/\S/);
99
}
1010

1111
export default isPrintableCharacter;

source/04-utility/_slide.es6.js

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,38 @@
1313
* @param {number?} duration - The duration of the animation, with default value 500.
1414
*/
1515
export const slideUp = (target, duration = 500) => {
16-
target.style.height = `${target.offsetHeight}px`;
17-
window.requestAnimationFrame(() => {
18-
target.style.transitionProperty = 'height, margin, padding';
19-
target.style.transitionDuration = `${duration}ms`;
20-
target.style.boxSizing = 'border-box';
21-
target.style.overflow = 'hidden';
22-
target.style.paddingTop = '0';
23-
target.style.paddingBottom = '0';
24-
target.style.marginTop = '0';
25-
target.style.marginBottom = '0';
16+
target.style.height = `${target.offsetHeight}px`;
17+
window.requestAnimationFrame(() => {
18+
target.style.transitionProperty = 'height, margin, padding';
19+
target.style.transitionDuration = `${duration}ms`;
20+
target.style.boxSizing = 'border-box';
21+
target.style.overflow = 'hidden';
22+
target.style.paddingTop = '0';
23+
target.style.paddingBottom = '0';
24+
target.style.marginTop = '0';
25+
target.style.marginBottom = '0';
2626

27-
window.requestAnimationFrame(() => {
28-
function hideTarget() {
29-
target.style.display = 'none';
30-
target.style.removeProperty('height');
31-
target.style.removeProperty('padding-top');
32-
target.style.removeProperty('padding-bottom');
33-
target.style.removeProperty('margin-top');
34-
target.style.removeProperty('margin-bottom');
35-
target.style.removeProperty('overflow');
36-
target.style.removeProperty('transition-duration');
37-
target.style.removeProperty('transition-property');
38-
target.removeEventListener('transitionend', hideTarget);
27+
window.requestAnimationFrame(() => {
28+
function hideTarget() {
29+
target.style.display = 'none';
30+
target.style.removeProperty('height');
31+
target.style.removeProperty('padding-top');
32+
target.style.removeProperty('padding-bottom');
33+
target.style.removeProperty('margin-top');
34+
target.style.removeProperty('margin-bottom');
35+
target.style.removeProperty('overflow');
36+
target.style.removeProperty('transition-duration');
37+
target.style.removeProperty('transition-property');
38+
target.removeEventListener('transitionend', hideTarget);
3939
const event = new CustomEvent('finishslider', { // eslint-disable-line
40-
detail: target,
41-
});
42-
target.dispatchEvent(event);
43-
}
44-
target.addEventListener('transitionend', hideTarget);
45-
target.style.height = '0';
46-
});
47-
});
40+
detail: target,
41+
});
42+
target.dispatchEvent(event);
43+
}
44+
target.addEventListener('transitionend', hideTarget);
45+
target.style.height = '0';
46+
});
47+
});
4848
};
4949

5050
/**
@@ -55,45 +55,45 @@ export const slideUp = (target, duration = 500) => {
5555
* @param {number?} duration - The duration of the animation, with default value 500.
5656
*/
5757
export const slideDown = (target, duration = 500) => {
58-
let height;
59-
target.style.removeProperty('display');
60-
window.requestAnimationFrame(() => {
61-
let { display } = window.getComputedStyle(target);
62-
if (display === 'none') {
63-
display = 'block';
64-
}
65-
target.style.display = display;
66-
height = target.offsetHeight;
67-
target.style.overflow = 'hidden';
68-
target.style.height = '0';
69-
target.style.paddingTop = '0';
70-
target.style.paddingBottom = '0';
71-
target.style.marginTop = '0';
72-
target.style.marginBottom = '0';
73-
target.style.boxSizing = 'border-box';
74-
target.style.transitionProperty = 'height, margin, padding';
75-
target.style.transitionDuration = `${duration}ms`;
58+
let height;
59+
target.style.removeProperty('display');
60+
window.requestAnimationFrame(() => {
61+
let { display } = window.getComputedStyle(target);
62+
if (display === 'none') {
63+
display = 'block';
64+
}
65+
target.style.display = display;
66+
height = target.offsetHeight;
67+
target.style.overflow = 'hidden';
68+
target.style.height = '0';
69+
target.style.paddingTop = '0';
70+
target.style.paddingBottom = '0';
71+
target.style.marginTop = '0';
72+
target.style.marginBottom = '0';
73+
target.style.boxSizing = 'border-box';
74+
target.style.transitionProperty = 'height, margin, padding';
75+
target.style.transitionDuration = `${duration}ms`;
7676

77-
window.requestAnimationFrame(() => {
78-
function showTarget() {
79-
target.style.removeProperty('padding-top');
80-
target.style.removeProperty('padding-bottom');
81-
target.style.removeProperty('margin-top');
82-
target.style.removeProperty('margin-bottom');
83-
target.style.removeProperty('height');
84-
target.style.removeProperty('overflow');
85-
target.style.removeProperty('transition-duration');
86-
target.style.removeProperty('transition-property');
87-
target.removeEventListener('transitionend', showTarget);
77+
window.requestAnimationFrame(() => {
78+
function showTarget() {
79+
target.style.removeProperty('padding-top');
80+
target.style.removeProperty('padding-bottom');
81+
target.style.removeProperty('margin-top');
82+
target.style.removeProperty('margin-bottom');
83+
target.style.removeProperty('height');
84+
target.style.removeProperty('overflow');
85+
target.style.removeProperty('transition-duration');
86+
target.style.removeProperty('transition-property');
87+
target.removeEventListener('transitionend', showTarget);
8888
const event = new CustomEvent('finishslider', { // eslint-disable-line
89-
detail: target,
90-
});
91-
target.dispatchEvent(event);
92-
}
93-
target.style.height = `${height}px`;
94-
target.addEventListener('transitionend', showTarget);
95-
});
96-
});
89+
detail: target,
90+
});
91+
target.dispatchEvent(event);
92+
}
93+
target.style.height = `${height}px`;
94+
target.addEventListener('transitionend', showTarget);
95+
});
96+
});
9797
};
9898

9999
/**
@@ -104,17 +104,17 @@ export const slideDown = (target, duration = 500) => {
104104
* @param {number?} duration - The duration of the animation, with default value 500.
105105
*/
106106
export const slideToggle = (target, duration = 500) => {
107-
if (!target.dataset.isSliding) {
108-
target.addEventListener('finishslider', () => {
109-
delete target.dataset.isSliding;
110-
target.removeEventListener('finishslider');
111-
});
112-
if (window.getComputedStyle(target).display === 'none') {
113-
target.dataset.isSliding = 'true';
114-
slideDown(target, duration);
115-
} else {
116-
target.dataset.isSliding = 'true';
117-
slideUp(target, duration);
118-
}
119-
}
107+
if (!target.dataset.isSliding) {
108+
target.addEventListener('finishslider', () => {
109+
delete target.dataset.isSliding;
110+
target.removeEventListener('finishslider');
111+
});
112+
if (window.getComputedStyle(target).display === 'none') {
113+
target.dataset.isSliding = 'true';
114+
slideDown(target, duration);
115+
} else {
116+
target.dataset.isSliding = 'true';
117+
slideUp(target, duration);
118+
}
119+
}
120120
};

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name: Gesso
33
Theme URI: https://github.com/forumone/gesso-wp
44
Description: Gesso starter theme
5-
Version: 5.2.0
5+
Version: 5.2.1
66
Author: Forum One
77
Author URI: http://forumone.com
88
License:

0 commit comments

Comments
 (0)