Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Mar 2018
    Location
    Morelos, Mexico
    Posts
    36

    Default CSS: How much is enough?

    Over the past few months, I have made a concerted effort to learn html, CSS, and a little (so far) JavaScript. I want to understand what Xara is generating from my web designs, and I want to be able to manipulate it as much as possible. Iíve found on talkgraphics several enlightening and enormously helpful posts.
    I know that there are some advocates here for coding some things by hand rather than using Xaraís coding. Acorn is the one Iíve noticed most prominently, but Iím aware there are some others.
    My question for the advocates is: How much manual coding (particularly CSS) do you think is appropriate, and how do you determine where to draw the line?
    Iíve noticed for example that with a few exceptions (e.g., named text types and some shape divs), Xara is big on using inline styling. I see no way to provoke Xara to generate classes automatically for similarly styled elements and to place the class styling in a style sheet, it simply repeats the CSS styling inline for each element. (One of Acornís posts concerning assignment of html classes was very helpful in allowing this by hand). This is at odds to best practices standards which indicate that styling should be placed in an external stylesheet whenever possible, with page-specific exceptions being placed internally in the head, and exceptionally (and sparingly), the CSS styling can be placed inline.
    Do you advocates make an effort to conform to the best practices standards by editing the coding, or do you allow Xara to do its thing and accept the result? If you do modify it, where do you set the limit where things just get too complicated to mess with?

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    10,467

    Default Re: CSS: How much is enough?

    Quote Originally Posted by gcellison View Post
    Over the past few months, I have made a concerted effort to learn html, CSS, and a little (so far) JavaScript. I want to understand what Xara is generating from my web designs, and I want to be able to manipulate it as much as possible. Iíve found on talkgraphics several enlightening and enormously helpful posts.
    I know that there are some advocates here for coding some things by hand rather than using Xaraís coding. Acorn is the one Iíve noticed most prominently, but Iím aware there are some others.
    My question for the advocates is: How much manual coding (particularly CSS) do you think is appropriate, and how do you determine where to draw the line?
    Iíve noticed for example that with a few exceptions (e.g., named text types and some shape divs), Xara is big on using inline styling. I see no way to provoke Xara to generate classes automatically for similarly styled elements and to place the class styling in a style sheet, it simply repeats the CSS styling inline for each element. (One of Acornís posts concerning assignment of html classes was very helpful in allowing this by hand). This is at odds to best practices standards which indicate that styling should be placed in an external stylesheet whenever possible, with page-specific exceptions being placed internally in the head, and exceptionally (and sparingly), the CSS styling can be placed inline.
    Do you advocates make an effort to conform to the best practices standards by editing the coding, or do you allow Xara to do its thing and accept the result? If you do modify it, where do you set the limit where things just get too complicated to mess with?
    I include CSS as added to the page for demonstrations here in TG as appending as an external file is too complicated to explain how it needs to be in a specified folder or how to link to the file using Xara's Attach File method.

    So the sanest approach is to use the Names function to add htmlclass to the required shapes, an external JavaScript file to manipulate the shapes and dynamic classes of the site, page or object and an external style sheet for the rest.
    Xara's support for coding is dire and with out a CSS editor and the browser developer tools, a dozen or so lines of code is soon unsupportable.

    Where possible, I use editable on-line generators; Xara even has a XWR file format that would easily support this.

    Acorn
    Acorn - My currently active Xara software: XDPX (current, v15, v12 & 11 (64-bit)), unserviced XWD Premium 15 & 12, XPGD10, X3D7; lots of licences back through time (to CC's Artworks). If your Post identifies a Xara software fault, please raise it directly with Magix --> support2.magix.com.

  3. #3
    Join Date
    Mar 2018
    Location
    Morelos, Mexico
    Posts
    36

    Default Re: CSS: How much is enough?

    I noticed that trying to use an external stylesheet looked like a lot of work as it cannot be done within Xara. It also opens up the risk of errors.

    I also realize that any styling an element using Xara (which appears inline) will override class attributes that you assign in web page properties, so you have to be careful not to have conflicts, or better yet, simply use an element as a placeholder.

    With respect to the XWR filetype, unfortunately, it doesn’t seem to be supported by the current version of Web Designer Premium (for export, that is. It apparently can be imported).

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    10,467

    Info Re: CSS: How much is enough?

    Quote Originally Posted by gcellison View Post
    I noticed that trying to use an external stylesheet looked like a lot of work as it cannot be done within Xara. It also opens up the risk of errors.

    I also realize that any styling an element using Xara (which appears inline) will override class attributes that you assign in web page properties, so you have to be careful not to have conflicts, or better yet, simply use an element as a placeholder.

    With respect to the XWR filetype, unfortunately, it doesít seemn to be supported by the current version of Web Designer Premium (for export, that is. It apparently can be imported).
    CSS files need to be place after the in-line styling or imbued with the !important affix.

    XWR files are alive and kicking; you drag them onto your design page from MS Explorer or add them as Disc designs to your Local Designs gallery.
    Xara cannot generate them as an output file as they are an XML construct.

    I have asked Xara for the full schema but I suspect the developer has moved on and the latter ones are unaware of its potential.
    Xara uses this approach here: https://www.talkgraphics.com/showthr...389#post596389.

    Acorn
    Acorn - My currently active Xara software: XDPX (current, v15, v12 & 11 (64-bit)), unserviced XWD Premium 15 & 12, XPGD10, X3D7; lots of licences back through time (to CC's Artworks). If your Post identifies a Xara software fault, please raise it directly with Magix --> support2.magix.com.

  5. #5
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,181

    Default Re: CSS: How much is enough?

    Quote Originally Posted by gcellison View Post
    Do you advocates make an effort to conform to the best practices standards by editing the coding, or do you allow Xara to do its thing and accept the result?
    The whole premise of Xara is to generate HTML web pages from a fixed design. Editing the output from Xara after it has been generated is definitely a very poor way of creating web sites.

    Best practices are about hand coding for maintainability and efficiency not for post editing machine-generated output.

    Xara is all about allowing you to create websites without knowing about the intricacies of HTML & CSS. It produces inefficient HTML/CSS scripts, but in many ways who cares? The browsers are fast and most Xara users slow down their web pages by having humungous images that slow down the browser way more than some inefficient markup will.

    Make a decision - if you want to have efficient web pages, learn more and ditch Xara altogether. If you like Xara, don't mess with the output it generates - it's an inefficient workflow that has little point.

  6. #6
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    10,467

    Default Re: CSS: How much is enough?

    @pauland, the OP's ask is not about post-processing, which would be nugatory, but about augmenting Xara's failings through CSS inclusions.

    As Xara is mainly a vector program, it should generate code that displays at scale (e.g., SVG) and not rely on clunky graphical outputs for NavBars, rotated (transformed) text, carousels and the like. Xara has been improving its code gradually but its insistence on SmartShapes for Tables and SPANned text lines fails accessibility criteria. My day job requires that this is satisfied where possible.

    Most of Xara's styling is controlled through external CSS files already. Most are quite small. ani.css, however, is 100kB as is jquery.js.
    Xara has failed to use techniques that would use already cached jQuery and the version it presented is now quite stale (as is ani.css).

    Most of my CSS & Javascript exploits are to overcome Xara limitations.

    Acorn
    Acorn - My currently active Xara software: XDPX (current, v15, v12 & 11 (64-bit)), unserviced XWD Premium 15 & 12, XPGD10, X3D7; lots of licences back through time (to CC's Artworks). If your Post identifies a Xara software fault, please raise it directly with Magix --> support2.magix.com.

  7. #7
    Join Date
    Jul 2007
    Location
    Brockville, Ontario, Canada.
    Posts
    4,254

    Default Re: CSS: How much is enough?

    Quote Originally Posted by Acorn View Post
    ... the OP's ask is not about post-processing, which would be nugatory, but about augmenting Xara's failings through CSS inclusions.
    I disagree ... The statement "Do you advocates make an effort to conform to the best practices standards by editing the coding, or do you allow Xara to do its thing and accept the result?" implies that the OP wishes to clean up Xara's code post production.
    Keith
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    There are 10 types of people in this world .... Those who understand binary, and those who don't.

  8. #8
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,181

    Default Re: CSS: How much is enough?

    Quote Originally Posted by Acorn View Post
    @pauland, the OP's ask is not about post-processing, which would be nugatory, but about augmenting Xara's failings through CSS inclusions.
    I'm not sure that's exactly right. We'll find out.

  9. #9
    Join Date
    Mar 2018
    Location
    Morelos, Mexico
    Posts
    36

    Default Re: CSS: How much is enough?

    Thanks to all for the input.

    Acorn is more on track to what I was asking. When I saw how much potential CSS offers that Xara doesnít take advantage ofÖ then I saw that it is possible to do SOME of it yourself by manipulating the software, it offered some hope.



    Quote Originally Posted by pauland View Post
    Best practices are about hand coding for maintainability and efficiency not for post editing machine-generated output.

    Xara is all about allowing you to create websites without knowing about the intricacies of HTML & CSS. It produces inefficient HTML/CSS scripts, but in many ways who cares? The browsers are fast and most Xara users slow down their web pages by having humungous images that slow down the browser way more than some inefficient markup will.

    Make a decision - if you want to have efficient web pages, learn more and ditch Xara altogether. If you like Xara, don't mess with the output it generates - it's an inefficient workflow that has little point.


    PaulandÖ while developing my skills enough to do scratch design would be amazing, it isnít a good use of my time. I am co-running a hotel, and the only website I design is ours. Nevertheless, I want to make it as impressive as possible. And I do think that efficiency matters. The search engines (particularly Google) are penalizing for inefficiency these days. We already show up later than Booking.com when someone searches for our name (who knows how much they pay for Google Ads). We donít want to be moved off of the first page altogether 😉.

    But my question was admittedly also meant to find out if anyone does happen to make post-export modifications. I wasnít suggesting that I intended to or that I wanted advice in doing it. I just wanted to know if others were doing it.

  10. #10
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,181

    Default Re: CSS: How much is enough?

    Quote Originally Posted by gcellison View Post
    The search engines (particularly Google) are penalizing for inefficiency these days.
    Perhaps you can point me to some specific articles on this subject (especially if they have specific relevance for Xara generated code)?

    We already show up later than Booking.com when someone searches for our name (who knows how much they pay for Google Ads). We don’t want to be moved off of the first page altogether ��.
    But that may be because they have a huge number of visitors, backlinks and (as you say) advertising. Your hotel being named on booking.com would also contribute!

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •