Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #307476

    guy_b
    Participant

    I don’t really expect anyone will know the answer to this, although I hope someone might..

    I use Sublime Text for code editing, and in Chrome, in combination with an extension called Live Edit, it is possible to link to a stylesheet, edit (or just compose) the CSS in Sublime, and watch the effects happen in real time.

    I basically wrote all my custom CSS code in X3 using Sublime, and it works beautifully in every site I build, WordPress, or any other framework.

    Since the release of X v4, it no longer works.

    It still works on all my other sites, both WP and not WP.

    This is clearly something to do with the Javascript interaction, however no errors are reported in the console.

    Something in X4 is blocking it. Cornerstone I guess is the cause..

    Any thoughts?

    #308029

    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    X4 and Cornerstone has no blocking capability. It doesn’t even use browser’s debugging protocol. I’m not sure what’s the issue is, all I can recommend is make sure that your extension is reaching your chromes debugger port (https://developer.chrome.com/devtools/docs/debugger-protocol)

    I know what you’re referring as I created one too for my android’s chrome. But I can’t help you since it’s not cover by our capability as support.

    Perhaps, contact your extension’s author.

    Thanks!

    #308502

    guy_b
    Participant

    In the unlikely event someone else stumbles on this post with the same question, the problem was being caused by a single parse error hidden in my 2000 lines of custom CSS, stemming from a small error in the custom SASS file.

    So the coincidence in timing to the upgrade was a red herring, it was my own mistake.

    There was one single extra bracket in a media query, which didn’t cause a problem with the display on the front end of the site, but bizarrely it prevented LiveStyle via Sublime from working.

    If there are any advanced users out there who might be interested in these tools, and if the question comes up in the search filters, then this is what I am speaking about:

    http://www.sublimetext.com/3

    along with a Chrome extension called LiveStyle (it doesn’t work in other browsers except for Safari):

    http://livestyle.emmet.io/

    When correctly configured, you can edit your CSS in “real time”, so any changes are visible on the page immediately, without saving or refreshing.

    If you add to this a Sublime extension called Sublime SFTP, you can also save/sync your custom styles to the server (including dev/staging or production), without even being logged into the WP Admin.

    http://wbond.net/sublime_packages/sftp

    __________________________________________________

    It’s possible to do exactly the same thing using a program called Brackets, although this is tied directly into Chrome itself (also requires Node.js), and uses a huge amount of local system memory:

    http://brackets.io/

    Note that Brackets is a separate thing from Sublime and LiveStyle, they do not work in conjunction with each other (although you could theoretically use them for the same purpose at the same time).

    I do not advise using Brackets for WordPress sites though.

    #308666

    Nico
    Moderator

    Thank you so much for the tip. We really appreciate it. We also learned from it.

    Have a great day! 🙂

    #308689

    guy_b
    Participant

    Sure, it’s good to share knowledge I think 🙂

    I’ve also wondered if X could provide a proper Live CSS editor in the time I’ve been using it, perhaps via something like ACE:

    http://ace.c9.io/#nav=about

    It’s definitely possible, as I’ve seen it use by at least one other WP theme.

    One thing about the theme where I’ve seen this in use though, is that they save the styles to the DB dynamically, and it causes a lot of problems in terms of caching.

    Anyway, just a thought, maybe useful for the future.

    Regards

    #308803

    Rue Nel
    Moderator

    Hey There,

    We will be adding this suggestion in our feature list. This feature is handy to advance users and a good addition to X theme features.

    All the best.

    #310948

    guy_b
    Participant

    Further to this, I have since discovered that the problem is not quite as simple as a bit of parse error in the CSS.

    If it is of any use, once again just on the really big off-chance that another X user runs into the same trouble and stumbles on this post seeking an answer…

    Something has broken between the new version of Chrome, the latest version of Sublime Text 3, and the current version of LiveStyle.

    I’ve got it working again properly (for now), however it required uninstalling the Chrome extension (from Chrome obviously), and the Sublime package for LiveStyle (from Sublime obviously).

    Then installing the Alpha version of the new LiveStyle, both in Chrome and Sublime.

    Feels like a socket error, and Chrome has been getting pretty hard core about their security and plugins, so without digging deeper, I still don’t know the real cause.

    Phwew. It’s working again, that’s a relief anyway.

    Whacky stuff. If you have an interest then here is the place to start:

    http://livestyle.emmet.io/alpha/

    Easy to forget how much one comes to rely on various tools, until they break…

    #311146

    Lely
    Moderator

    Hello There,

    Thank you so much for sharing this information.

    Cheers!
    X