Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jun 14, 2021
2 parents fbdc168 + 3907f4d commit 16542e4
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build
Submodule build updated 1 files
+48 −33 package-lock.json
20 changes: 19 additions & 1 deletion inc/controller-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
)
),
array(
'title' => __('Background image', 'so-css'),
'title' => __('Background Image', 'so-css'),
'type' => 'image',
'args' => array(
'property' => 'background-image',
Expand Down Expand Up @@ -299,6 +299,24 @@
)
),

array(
'title' => __( 'Border Radius', 'so-css' ),
'type' => 'sides',
'args' => array(
'controllers' => array(
array(
'type' => 'measurement',
'args' => array(
'property' => 'border-{dir}-radius',
'propertyAll' => 'border-radius',
'defaultUnit' => 'px'
)
),
),
'isRadius' => true,
'hasAll' => true,
)
),
)
),

Expand Down
20 changes: 18 additions & 2 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,12 @@
*/
scaleEditor: function () {
var windowHeight = $( window ).outerHeight();
var areaHeight;
if ( this.$el.hasClass( 'expanded' ) ) {
// If we're in the expanded view, then resize the editor
this.$el.find( '.CodeMirror-scroll' ).css( 'max-height', '' );
this.codeMirror.setSize( '100%', windowHeight - this.$( '.custom-css-toolbar' ).outerHeight() );
areaHeight = windowHeight - this.$( '.custom-css-toolbar' ).outerHeight();
this.codeMirror.setSize( '100%', areaHeight );
}
else {
// Attempt to calculate approximate space available for editor when not expanded.
Expand All @@ -384,9 +386,17 @@
$form.find( '> .custom-css-toolbar' ).outerHeight( true ) +
$form.find( '> p.description' ).outerHeight( true ) +
parseFloat( $( '#wpbody-content' ).css( 'padding-bottom' ) );
this.$el.find( '.CodeMirror-scroll' ).css( 'max-height', windowHeight - otherEltsHeight + 'px' );

areaHeight = windowHeight - otherEltsHeight;
// The container has a min-height of 300px so we need to ensure the areaHeight is at least that large.
if ( areaHeight < 300 ) {
areaHeight = 300;
}

this.$el.find( '.CodeMirror-scroll' ).css( 'min-height', areaHeight + 'px' );
this.codeMirror.setSize( '100%', 'auto' );
}
this.$el.find( '.CodeMirror-code' ).css( 'min-height', areaHeight + 'px' );
},

/**
Expand Down Expand Up @@ -1739,6 +1749,12 @@
this.$( '.select-tab' ).eq( 0 ).remove();
this.$( '.select-tab' ).css( 'width', '25%' );
}

if ( ! this.args.isRadius ) {
this.$( '.select-tabs[data-type="radius"]' ).remove();
} else {
this.$( '.select-tabs[data-type="box"]' ).remove();
}

this.$( '.select-tab' ).each( function ( index, element ) {
var dir = $( element ).data( 'direction' );
Expand Down
34 changes: 22 additions & 12 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
=== SiteOrigin CSS ===
Tags: css, design, edit, customize
Tags: css, visual css, css editor, design, customize
Requires at least: 3.9
Tested up to: 5.7
Stable tag: trunk
Build time: unbuilt
License: GPLv2 or later
Contributors: gpriday
Contributors: gpriday, alexgso
Donate link: https://siteorigin.com/downloads/premium/

SiteOrigin CSS is the simple, yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time.
SiteOrigin CSS is the simple yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time.

== Description ==

SiteOrigin CSS is the simple, yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time.
SiteOrigin CSS is the simple yet powerful CSS editor for WordPress. It gives you visual controls that let you edit the look and feel of your site in real-time.

We've created a site editing experience that will suit both beginners and advanced users alike. Beginners will love the simple visual controls and real-time preview. Advanced users will love the code autocompletion that makes writing CSS faster than ever.

[vimeo https://vimeo.com/129660380]

= Inspector =

The hardest part of editing your site's design using CSS is usually finding the correct selector to use. The powerful inspector that comes with SiteOrigin CSS makes this easy. While viewing a full preview of your site, just click on an element and it'll help you identify the best selector to use to target that element.
The hardest part of editing your site's design using CSS is usually finding the correct selector to use. The powerful inspector that comes with SiteOrigin CSS makes this easy. While viewing a full preview of your site, just click on an element, and it'll help you identify the best selector to use to target that element.

The Inspector will help you even if you have no idea what a CSS selector is.
The inspector will help you even if you have no idea what a CSS selector is.

= Visual Editor =

Don't like playing around with code? No problem. SiteOrigin CSS has a set of simple controls that make it easy to choose colors, styles and measurements. Combined with the Inspector, you'll be able to make changes in just a few clicks.
Don't like playing around with code? No problem. SiteOrigin CSS has a set of simple controls that make it easy to choose colors, styles, and measurements. Combined with the inspector, you'll be able to make changes in just a few clicks.

= CSS Editor =

SiteOrigin CSS has a powerful CSS editor, the likes of which you'd usually only expect from high-end IDEs. It has autocompletion for both CSS selectors and attributes. It also features very useful CSS linting that'll help you identify issues in your code before you publish your changes.
SiteOrigin CSS has a powerful CSS editor, the likes of which you'd usually only expect from high-end IDEs. It has autocompletion for both CSS selectors and attributes. It also features very useful CSS linting to help you identify issues in your code before you publish your changes.

= It's Free =

We're committed to keeping SiteOrigin CSS, free. You can install it on as many sites as you like without ever worrying about licensing. All future updates and upgrades will be free, and we even offer free support over on our friendly support forums.
We're committed to keeping SiteOrigin CSS free. You can install it on as many sites as you like without ever worrying about licensing. All future updates and upgrades will be free, and we even offer free support over on our friendly support forums.

= Works With Any Theme =

There's an ever-growing collection of awesome WordPress themes, and now with SiteOrigin CSS you can edit every single one of them to your heart's content. No matter what theme you're using, SiteOrigin CSS will work perfectly.
There's an ever-growing collection of awesome WordPress themes, and now with SiteOrigin CSS, you can edit every single one of them to your heart's content. No matter what theme you're using, SiteOrigin CSS will work perfectly.

= Actively Developed =

Expand All @@ -51,7 +51,7 @@ We're actively developing SiteOrigin CSS. Keep track of what's happening over on

== Screenshots ==
1. Inspector for finding elements on your site.
2. Simple visual controls including a background image uploader.
2. Simple visual controls, including a background image uploader.
3. A full CSS editor that works in real-time with a preview of your site.
4. Code completion for all your theme's selectors.

Expand All @@ -61,10 +61,20 @@ We're actively developing SiteOrigin CSS. Keep track of what's happening over on

== Support ==

We offer free support on the [SiteOrigin support forums](https://siteorigin.com/thread/).
Free support is available on the [SiteOrigin support forums](https://siteorigin.com/thread/).

== SiteOrigin Premium ==

[SiteOrigin Premium](https://siteorigin.com/downloads/premium/) enhances SiteOrigin CSS with a Google Web Font Selector. Choose from hundreds of beautiful web fonts right in the visual editor.

SiteOrigin Premium also includes access to our next-level email support service, perfect for those times when you need fast and effective technical support.

== Changelog ==

= 1.3.0 - 14 June 2021 =
* Inspector: Added a new Border Radius setting to the Decoration tab.
* Allowed for right-clicking anywhere in the Basic Editor.

= 1.2.14 - 26 April 2021 =
* Resolved Photo Gallery by 10Web plugin conflict.

Expand Down
10 changes: 9 additions & 1 deletion tpl/js-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,22 @@
<script type="text/template" id="template-sides-field">
<div class="spacing-field">

<ul class="select-tabs side-tabs">
<ul class="select-tabs side-tabs" data-type="box">
<li class="select-tab side-tab" data-direction="all"><div class="spacing-all"></div></li>
<li class="select-tab side-tab" data-direction="top"><div class="spacing-top"></div></li>
<li class="select-tab side-tab" data-direction="right"><div class="spacing-right"></div></li>
<li class="select-tab side-tab" data-direction="bottom"><div class="spacing-bottom"></div></li>
<li class="select-tab side-tab" data-direction="left"><div class="spacing-left"></div></li>
</ul>

<ul class="select-tabs side-tabs" data-type="radius">
<li class="select-tab side-tab" data-direction="all"><div class="spacing-all"></div></li>
<li class="select-tab side-tab" data-direction="top-right"><div class="spacing-top spacing-right"></div></li>
<li class="select-tab side-tab" data-direction="bottom-right"><div class="spacing-bottom spacing-right"></div></li>
<li class="select-tab side-tab" data-direction="bottom-left"><div class="spacing-bottom spacing-left"></div></li>
<li class="select-tab side-tab" data-direction="top-left"><div class="spacing-top spacing-left"></div></li>
</ul>

<ul class="sides">

</ul>
Expand Down

0 comments on commit 16542e4

Please sign in to comment.