LESS is awesome for CSS
-
ResolvedAs I have learned CSS (again) working on my non-profit project. I started thinking that CSS is really object-oriented without a compiler. Today, I found the compiler and the LESS language that drastically simplifies CSS modifications.
Could you guys use this and provide a .less CSS file in future versions? http://wearekiss.com/simpless and http://lesscss.org/
I could see a dramatic improvement in usability if I had a set of top-level variables that would automatically be compiled in to the correct CSS. For example, if I want to theme EasyBlog to use sprites that are larger than the distribution. Well-written LESS lets me do it with just 2 lines of code! I just specify the new sprites file name and the size of the grid and it compiles everything else.
Subscribed Products:
Accepted Answer
-
Selected answer for this questionHello Dean,
Yep, we're actually implementing LESS css on our new media manager. We can't just switch the existing theme structure to LESS simply because this will cause a huge inconvenience for users who were customizing the css file on older versions
We're actually gearing towards LESS for most of our new additions
Adam likes this post.-
Sweet. Totally understand about reverse compatibility. That is why I like the compiler form. I understand there is a PHP interpreter/real-time compiler (that is reverse compatible with standard CSS). I haven't found it to play with it yet but was thinking it should be a Joomla plugin if it is fast and reliable.
-
5 responses Add a reply
-
Here is an example lesscss for a sprite file that has icons on a 35px grid. It can also be multiple layers deep so the whole thing can be put in a wrapper with just two extra lines.
/* css test */ @mastersprite-row: -35px; @mastersprite-column: -35px; #mastersprite { background-image: url('http://cdn2.stackideas.com/all-normal.png'); background-repeat: no-repeat; background-position: 0px 0px; } .iconAt (@x: 0, @y: 0) { #mastersprite; background-position: @mastersprite-column*@y @mastersprite-row*@x; width: @mastersprite-row * -1; height: @mastersprite-column * -1; } .folder { .iconAt(0, 0); } .openfolder { .iconAt(0, 1); } .shortcutfolder { .iconAt(0,2); } .fullfolder { .iconAt(0,3); }
And the html would be like:
<div class="folder"> </div>
Subscribed Products: -
As you guys transition you may find 'lessify' a handy tool. It is not sophisticated. I takes a traditional CSS file and creates LESS nestings where it identifies them. I've been playing with it and I would call it a "jump start" to switch from CSS to less but it is more concerned with being non-harmful than implementing anything more than nested CSS.
http://leafo.net/lessphp/lessify/
Subscribed Products: -
Subscribed Products: -
Hello Dean,
I am sorry for the late reply.
The easiest way of doing this is to run a sql statement to update all the thread that has no reply after a certain amount days. E.g. the below sql:
update jos_discuss_posts set isresolve = 1 where parent_id = 0 and DATEDIFF(now(), replied) >= 300;
The above sql will update main discussions ( parent_id = 0 ) that is no replies made for more than 300 days.
If you want to put a 'note' to the discussion, then I think you will need to write a php code to first retrieve these discussion and for each thread, you will add a reply into the discussion with the text 'Thread marked resolved due to inactivity of 300 days.' and at the same time, update the thread to resolved. So two steps involved in your php code
Hope this help and have a nice day
Your Response
Please login to reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.