Jump to content

Archived

This topic is now archived and is closed to further replies.

Loathing

LESS attribute array breaks custom CSS

Recommended Posts

Loathing
If I use the following as part of a local html page with a reference to less.js v1.7.5 then it works fine: [ptiframe]109-oyxjwe[/ptiframe] However, adding the mixin (without the style tags obviously) to the custom CSS section breaks the CSS. Specifically, it DMS2 doesn't like "@rules();" I read on CSS tricks that PageLines is using its own forked version of LESS, so maybe that is the problem?

Share this post


Link to post
Share on other sites
Simon

DMS only loads less.js when the editor is active.

 

Where is rules() defined?

 

All code in the customcss box is passed through the php less compiler.

Share this post


Link to post
Share on other sites
Loathing

> Where is rules() defined?

 

@rules() is defined in the argument passed to placeholder, e.g. .placeholder(@rules) { ... } Even though it is defined as @rules, @rules() is used.

 

 

Coming from a C# background, I would call it an anonymous mixin.  I found someone using this syntax on stackoverflow: http://stackoverflow.com/questions/23728726/css-less-placeholder-mixin (By user464435)

Share this post


Link to post
Share on other sites
Danny

I have just this moment added a similar version to what DMS uses roughly 1.5.x and added the following to my <head>:

 

<script type="text/javascript">less = { env: 'development' };</script>

 

When I view my .html file which is just a copy/paste of your code above, I get a parse error. So this issue is related to the version, DMS uses an old version and thus, there lies the problem.

 

https://cloudup.com/cyVkeiBrzDd


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Loathing

OK, thanks for confirming.  Does DMS2 keep relatively close to the newest LESS version?

Share this post


Link to post
Share on other sites
Danny

As far as I know, we try to, but something like updating LESS requires a lot of time to make sure it doesn't nuke DMS. However, I will speak to our developers personally and see if this is something we can update in the future.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • gstrahle
      By gstrahle+
      Hi,
      I am hoping to figure out how I can get my PageLines Full Nav to display layered in front of a sticky footer element on my website - 3keymedia.com
      I would like the Full Nav to overlay the entire screen when opening the menu as you will see when opening on a desktop the footer of nav content is cropped by the sticky footer.
       
      Thanks


    • Christian
      By Christian+
      Hi everyone, since Instagram had allowed to publish in different ratio formats (instead of only square ratio) the grams stripe has different heights. Can you tell me if i can fix it easily with some CSS?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
×