Skip to content

Commit bdd74b3

Browse files
committed
Refactoring...
1 parent 38f4da2 commit bdd74b3

File tree

118 files changed

+345
-6931
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+345
-6931
lines changed

docs/bundle.css

Lines changed: 24 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,20 +1405,20 @@ html, body {
14051405
left: 310px;
14061406
position: absolute;
14071407
}
1408-
.csseditor .flex-row {
1408+
.csseditor .feature-control {
14091409
display: flex;
14101410
flex-direction: column;
14111411
height: 100%;
14121412
}
1413-
.csseditor .flex-row > div {
1413+
.csseditor .feature-control > div {
14141414
flex: 1 1 auto;
1415+
position: relative;
14151416
}
1416-
.csseditor .flex-row .fixed {
1417+
.csseditor .feature-control > div:last-child {
14171418
flex: none;
1418-
height: 240px;
1419-
overflow: auto;
1419+
height: 40%;
1420+
border-top: 1px solid #cccccc;
14201421
box-sizing: border-box;
1421-
border-bottom: 1px solid #cccccc;
14221422
}
14231423
.csseditor .tab {
14241424
position: absolute;
@@ -3273,100 +3273,6 @@ html, body {
32733273
font-size: 11px;
32743274
margin-bottom: 2px;
32753275
}
3276-
.csseditor .property > .property-body .property-item .property-item-label,
3277-
.csseditor .property > .property-body .property-item .property-item-input-field {
3278-
vertical-align: middle;
3279-
}
3280-
.csseditor .property > .property-body .property-item .property-item-label .tools,
3281-
.csseditor .property > .property-body .property-item .property-item-input-field .tools {
3282-
padding: 2px;
3283-
text-align: right;
3284-
}
3285-
.csseditor .property > .property-body .property-item .property-item-label button,
3286-
.csseditor .property > .property-body .property-item .property-item-input-field button {
3287-
-webkit-appearance: none;
3288-
-moz-appearance: none;
3289-
appearance: none;
3290-
background-color: transparent;
3291-
border: 0px;
3292-
cursor: pointer;
3293-
padding: 0px 3px;
3294-
outline: none;
3295-
vertical-align: middle;
3296-
}
3297-
.csseditor .property > .property-body .property-item .property-item-label button svg,
3298-
.csseditor .property > .property-body .property-item .property-item-input-field button svg {
3299-
width: 16px;
3300-
height: 16px;
3301-
}
3302-
.csseditor .property > .property-body .property-item .property-item-label.grid-1-3,
3303-
.csseditor .property > .property-body .property-item .property-item-input-field.grid-1-3 {
3304-
display: grid;
3305-
grid-template-columns: 1fr 3fr;
3306-
}
3307-
.csseditor .property > .property-body .property-item .property-item-label {
3308-
box-sizing: border-box;
3309-
padding: 5px;
3310-
}
3311-
.csseditor .property > .property-body .property-item.grid-0 {
3312-
grid-template-columns: 1fr;
3313-
}
3314-
.csseditor .property > .property-body .property-item.grid-2 {
3315-
grid-template-columns: 1fr 3fr;
3316-
}
3317-
.csseditor .property > .property-body .property-item.grid-4 {
3318-
grid-template-columns: 1fr 1fr 1fr 1fr;
3319-
}
3320-
.csseditor .property > .property-body .property-item.grid-4 .property-item-input-field input {
3321-
width: 40px;
3322-
}
3323-
.csseditor .property > .property-body .property-item.background-color, .csseditor .property > .property-body .property-item.font-color {
3324-
grid-template-columns: 1fr;
3325-
}
3326-
.csseditor .property > .property-body .property-item.background-color .fill-item, .csseditor .property > .property-body .property-item.font-color .fill-item {
3327-
display: grid;
3328-
height: 24px;
3329-
grid-template-columns: 24px auto;
3330-
grid-column-gap: 5px;
3331-
margin-bottom: 5px;
3332-
text-align: center;
3333-
}
3334-
.csseditor .property > .property-body .property-item.background-color .fill-item .preview, .csseditor .property > .property-body .property-item.font-color .fill-item .preview {
3335-
display: inline-block;
3336-
height: 100%;
3337-
box-sizing: border-box;
3338-
cursor: pointer;
3339-
}
3340-
.csseditor .property > .property-body .property-item.background-color .fill-item .preview .mini-view, .csseditor .property > .property-body .property-item.font-color .fill-item .preview .mini-view {
3341-
width: 100%;
3342-
height: 100%;
3343-
border: 1px solid #cccccc;
3344-
position: relative;
3345-
border-radius: 100%;
3346-
background-color: transparent;
3347-
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
3348-
background-size: 10px 10px;
3349-
background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
3350-
}
3351-
.csseditor .property > .property-body .property-item.background-color .fill-item .preview .mini-view .color-view, .csseditor .property > .property-body .property-item.font-color .fill-item .preview .mini-view .color-view {
3352-
position: absolute;
3353-
left: 0px;
3354-
top: 0px;
3355-
right: 0px;
3356-
bottom: 0px;
3357-
border-radius: 100%;
3358-
}
3359-
.csseditor .property > .property-body .property-item.background-color .fill-item .color-code input, .csseditor .property > .property-body .property-item.font-color .fill-item .color-code input {
3360-
width: 100%;
3361-
height: 100%;
3362-
}
3363-
.csseditor .property > .property-body .property-item.background-color .fill-item .opacity-code, .csseditor .property > .property-body .property-item.font-color .fill-item .opacity-code {
3364-
display: grid;
3365-
grid-template-columns: 1fr 3fr;
3366-
}
3367-
.csseditor .property > .property-body .property-item.background-color .fill-item .opacity-code input, .csseditor .property > .property-body .property-item.font-color .fill-item .opacity-code input {
3368-
width: 100%;
3369-
}
33703276
.csseditor .border-item {
33713277
display: grid;
33723278
grid-template-columns: 1fr 3fr;
@@ -3658,54 +3564,6 @@ html, body {
36583564
width: 100%;
36593565
height: 100%;
36603566
}
3661-
.csseditor .outline-item {
3662-
grid-template-columns: 1fr 3fr;
3663-
grid-column-gap: 10px;
3664-
}
3665-
.csseditor .outline-item .input-group {
3666-
display: grid;
3667-
grid-template-rows: repeat(3, 1fr);
3668-
}
3669-
.csseditor .outline-item .input-field {
3670-
display: grid;
3671-
grid-template-columns: 1fr 3fr;
3672-
grid-column-gap: 4px;
3673-
vertical-align: middle;
3674-
}
3675-
.csseditor .outline-item .input-field input {
3676-
width: 100%;
3677-
vertical-align: middle;
3678-
}
3679-
.csseditor .outline-item .input-field .input-ui {
3680-
vertical-align: middle;
3681-
display: grid;
3682-
grid-template-columns: repeat(2, 1fr);
3683-
}
3684-
.csseditor .outline-item .input-field .input-ui input {
3685-
width: 100%;
3686-
}
3687-
.csseditor .outline-item .input-field .input-ui .color {
3688-
background-color: white;
3689-
height: 20px;
3690-
width: 20px;
3691-
border-radius: 100%;
3692-
cursor: pointer;
3693-
border: 1px solid #cccccc;
3694-
box-sizing: border-box;
3695-
position: relative;
3696-
background-color: transparent;
3697-
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%);
3698-
background-size: 10px 10px;
3699-
background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
3700-
}
3701-
.csseditor .outline-item .input-field .input-ui .color .color-view {
3702-
position: absolute;
3703-
left: 0px;
3704-
top: 0px;
3705-
right: 0px;
3706-
bottom: 0px;
3707-
border-radius: 100%;
3708-
}
37093567
.csseditor .box-model-item {
37103568
grid-template-columns: 1fr !important;
37113569
}
@@ -3892,49 +3750,6 @@ html, body {
38923750
height: 140px;
38933751
box-sizing: border-box;
38943752
}
3895-
.csseditor .font-item {
3896-
margin-bottom: 2px;
3897-
}
3898-
.csseditor .font-item label {
3899-
text-align: right;
3900-
vertical-align: middle;
3901-
font-size: 13px;
3902-
padding-right: 4px;
3903-
}
3904-
.csseditor .font-item .input {
3905-
vertical-align: middle;
3906-
display: grid;
3907-
grid-template-columns: 1fr 40px 70px;
3908-
grid-column-gap: 4px;
3909-
}
3910-
.csseditor .font-item .input .input-field input,
3911-
.csseditor .font-item .input .input-field select {
3912-
width: 100%;
3913-
outline: none;
3914-
}
3915-
.csseditor .export-view {
3916-
position: absolute;
3917-
left: 50%;
3918-
bottom: 10px;
3919-
width: 50%;
3920-
height: 100px;
3921-
z-index: 100000;
3922-
-webkit-transform: translateX(-30%);
3923-
transform: translateX(-30%);
3924-
}
3925-
.csseditor .export-view .codeview {
3926-
position: relative;
3927-
width: 100%;
3928-
height: 100%;
3929-
}
3930-
.csseditor .export-view .codeview textarea {
3931-
width: 100%;
3932-
height: 100%;
3933-
display: block;
3934-
padding: 10px;
3935-
margin: 0px;
3936-
background-color: rgba(255, 255, 255, 0.1);
3937-
}
39383753
.csseditor .animation-list {
39393754
grid-template-columns: 1fr !important;
39403755
}
@@ -4319,12 +4134,18 @@ html, body {
43194134
display: grid;
43204135
grid-template-columns: 1fr 50px 50px;
43214136
grid-column-gap: 2px;
4137+
font-size: 13px;
4138+
}
4139+
.csseditor .range-editor .range-editor-type .area span {
4140+
padding: 1px;
4141+
box-sizing: border-box;
4142+
vertical-align: middle;
43224143
}
43234144
.csseditor .range-editor .range-editor-type .area input, .csseditor .range-editor .range-editor-type .area select {
43244145
width: 100%;
43254146
}
43264147
.csseditor .range-editor .range-editor-type[data-type=calc] .area {
4327-
grid-template-columns: 50px 1fr;
4148+
grid-template-columns: 60px 1fr;
43284149
}
43294150
.csseditor .range-editor[data-selected-type=calc] .range-editor-type[data-type=calc] {
43304151
display: inline-block;
@@ -5345,11 +5166,6 @@ html, body {
53455166
padding: 10px 5px;
53465167
font-weight: bold;
53475168
}
5348-
.csseditor .popup .popup-content .popup-item {
5349-
display: grid;
5350-
grid-template-columns: 45px 1fr;
5351-
height: 24px;
5352-
}
53535169
.csseditor .popup .popup-content .popup-item label {
53545170
font-size: 11px;
53555171
vertical-align: middle;
@@ -5361,22 +5177,14 @@ html, body {
53615177
.csseditor .popup .popup-content .popup-item label + div {
53625178
vertical-align: middle;
53635179
}
5364-
.csseditor .popup .popup-content .popup-item input[type=range] {
5365-
width: 80px;
5366-
flex: none;
5367-
}
5368-
.csseditor .popup .popup-content .popup-item input[type=number] {
5369-
width: 40px;
5370-
flex: none;
5371-
border: 1px solid #cccccc;
5180+
.csseditor .popup.background-property-popup {
5181+
width: 260px;
53725182
}
5373-
.csseditor .popup .popup-content .popup-item select {
5374-
width: 40px;
5375-
flex: none;
5376-
outline: none;
5183+
.csseditor .popup.background-property-popup .popup-content {
5184+
padding: 5px;
53775185
}
5378-
.csseditor .popup.background-property-popup {
5379-
width: 225px;
5186+
.csseditor .popup.background-property-popup .popup-content .popup-item {
5187+
margin-bottom: 2px;
53805188
}
53815189
.csseditor .popup.background-property-popup .size-list button {
53825190
-webkit-appearance: none;
@@ -5395,6 +5203,11 @@ html, body {
53955203
background-color: #cccccc;
53965204
font-weight: bold;
53975205
}
5206+
.csseditor .popup.background-property-popup .popup-item.grid-2 {
5207+
display: grid;
5208+
grid-template-columns: 60px 1fr;
5209+
grid-column-gap: 2px;
5210+
}
53985211
.csseditor .popup.background-property-popup .repeat-list button {
53995212
width: 24px;
54005213
height: 24px;
@@ -5621,11 +5434,6 @@ html, body {
56215434
text-align: left;
56225435
vertical-align: middle;
56235436
}
5624-
.csseditor .popup.animation-property-popup .box input,
5625-
.csseditor .popup.animation-property-popup .box select {
5626-
width: 100%;
5627-
vertical-align: middle;
5628-
}
56295437
.csseditor .popup.animation-property-popup .box .input {
56305438
vertical-align: middle;
56315439
display: grid;

docs/bundle.css.gz

14.7 KB
Binary file not shown.

docs/index.html.gz

595 Bytes
Binary file not shown.

docs/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/main.js.gz

83.7 KB
Binary file not shown.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gradient-easylogic-studio",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Fantastic Free Open Source CSS Editor ",
55
"main": "index.js",
66
"directories": {
@@ -13,6 +13,7 @@
1313
"autoprefixer": "^9.5.1",
1414
"babel-loader": "^8.0.5",
1515
"babel-plugin-external-helpers": "^6.22.0",
16+
"compression-webpack-plugin": "^3.0.0",
1617
"copy-webpack-plugin": "^5.0.3",
1718
"css-loader": "^2.1.1",
1819
"cssnano": "^4.1.10",

src/assets/app/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"manifest_version": 2,
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"name": "Gradient Editor",
5-
"description": "CSS Gradient Editor - EasyLogic Studio",
5+
"description": "Super CSS Gradient Editor - EasyLogic Studio",
66
"author": "easylogic",
77
"app": {
88
"background": {

src/assets/extension/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"manifest_version": 2,
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"name": "Gradient Editor",
5-
"description": "CSS Gradient Editor - EasyLogic Studio",
5+
"description": "Super CSS Gradient Editor - EasyLogic Studio",
66
"author": "easylogic",
77
"background": {
88
"scripts": ["background.js"],

src/colorpicker/BaseColorPicker.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import ColorSetsList from './module/ColorSetsList'
33
import ColorManager from './module/ColorManager';
44
import { MOUSEUP } from '../util/Event';
55
import { defaultValue, isFunction } from '../util/functions/func';
6-
import { px } from '../util/css/types';
76
import UIElement from '../util/UIElement';
87
import BaseStore from '../util/BaseStore';
8+
import { Length } from '../editor/unit/Length';
99

1010
export default class BaseColorPicker extends UIElement {
1111

@@ -213,8 +213,8 @@ export default class BaseColorPicker extends UIElement {
213213

214214
// set position
215215
this.$root.css({
216-
left: px(elementScreenLeft),
217-
top: px(elementScreenTop)
216+
left: Length.px(elementScreenLeft),
217+
top: Length.px(elementScreenTop)
218218
});
219219

220220
// this.definePositionForArrow(opt, elementScreenLeft, elementScreenTop);
@@ -232,8 +232,8 @@ export default class BaseColorPicker extends UIElement {
232232
var position = this.opt.position == 'absolute' ? 'absolute' : 'fixed'
233233
return {
234234
position, // color picker has fixed position
235-
left: '-10000px',
236-
top: '-10000px'
235+
left: Length.px(-10000),
236+
top: Length.px(-10000)
237237
}
238238
}
239239
}

0 commit comments

Comments
 (0)