Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 22 2019 16:30
    jcchalte commented #567
  • Jan 15 2019 14:44
    Tigraine commented #564
  • Jan 15 2019 13:45
    CZEMacLeod commented #564
  • Jan 15 2019 11:23
    twenzel commented #564
  • Jan 15 2019 09:32
    Tigraine closed #564
  • Jan 15 2019 09:32
    Tigraine commented #564
  • Dec 28 2018 00:28
  • Dec 19 2018 18:19
    petersmm commented #548
  • Nov 27 2018 08:07

    twenzel on master

    Fix typo in description (compare)

  • Nov 26 2018 11:27

    twenzel on master

    Updated Nuget key (compare)

  • Nov 23 2018 15:38
  • Nov 16 2018 16:56
    rcollette commented #283
  • Nov 12 2018 20:00
    CZEMacLeod commented #283
  • Nov 10 2018 05:12
    rcollette closed #283
  • Nov 04 2018 08:28
  • Oct 30 2018 20:30
    petersmm commented #548
  • Oct 30 2018 20:30
    petersmm commented #548
  • Oct 30 2018 07:56
    twirpx opened #567
  • Oct 24 2018 21:09
    twenzel commented #524
Lauri Kotilainen
@rytmis
There's been a nasty threading bug since 1.5.0. :(
It should have been obvious to me, given that I know the parser is stateful. But noooooo.
And it doesn't help that I've let the issue lie unfixed for several months after the first report. In my defense though, I bought a house and have been renovating it. :P
Booster2ooo
@Booster2ooo
Hello there !
I've got a little question, I don't think it's covered by the doc (I don't even know if it's implemented yet): I'm looking to build a mixin where you can pass @property-name and @property-value ( @{property-name}: @{property-value}; ) such as explained in this less.js thread: less/less.js#36
It seems to work when I prefix the property-name variable but not when a line starts with @
Am I doing something wrong ? Is there a proper way to achieve this ? Should I open an issue ticket ?
dimtabu
@taburetkin
just interesting
anybody home? :)
Daniel Hoelbling-Inzko
@Tigraine
@taburetkin hi :)
dimtabu
@taburetkin
wow!
can`t find any news about this project
is it alive?
Lauri Kotilainen
@rytmis
Hello
I try to fix bugs every now and then, but my motivation for that is not very high at the moment -- the reason being that parts of the dotless codebase are hard to work with, and for newer projects, using less.js directly is fairly straightforward.
Lauri Kotilainen
@rytmis
The Regex-based parser is a bit of a pain in my opinion -- adding support for complex constructs is a lot more difficult than it would need to be. I'm sort of tinkering with a potential replacement, but it's still a long way from being complete. It's an ANTLR4 grammar based parser, with an evaluation pipeline that tries very hard to be more straightforward than some of the hairier parts of dotless.
dimtabu
@taburetkin
i use dotless in .net mvc projects (SPA and old school mvc)
because its just 2 packages from nuget
with clean lessjs i have to setup prebuild actions but i am too lazy
Lauri Kotilainen
@rytmis
Yeah, I know.
I have a lot of projects like that as well.
dimtabu
@taburetkin
and you don't need to rebuild css after changinr in less because of filecache dependency in bundles
Lauri Kotilainen
@rytmis
Which is part of the reason I'm still tinkering. :)
dimtabu
@taburetkin
few days ago i wrote SmartLessBundle
i have to
Lauri Kotilainen
@rytmis
But yeah, the compilation step in 1.5 is really slow these days. It's kinda my fault, but fixing it within the current dotless codebase is a decidedly non-trivial task.
And I'd love to support detached rulesets and whatnot, but while not impossible, it's tedious to make work with the current parser.
dimtabu
@taburetkin
can i ask something about bundle compilation process?
Lauri Kotilainen
@rytmis
Of course -- I won't guarantee that I can answer, though.
dimtabu
@taburetkin

ok. today i have to organize my less files like this

//main.less file
@import "one-cool-stuff.less";
@import "another-cool-stuff.less";
@import ....

and my bundle definition looks like

            bundles.Add(new LessBundle("~/bndls/css/").Include(
                      "~/Content/less/main.less"
                      ));

thats only the way if i want share variables and mixins in this separated less files
is this correct?

Lauri Kotilainen
@rytmis
Wee-ell... sorta. I don't remember the specifics of the LessBundle implementation, but if it evaluates each file separately, then yeah, that's about the extent of it.
dimtabu
@taburetkin
few days ago i look at the source and yes, it is
Lauri Kotilainen
@rytmis
I mean, of course you can also import the vars and mixins in each separate file and then include those files in the bundle (so no single entry point), but that's just more verbose.
Of course, that does have the benefit of supporting tooling better (for autocompletes and such).
dimtabu
@taburetkin
thats why i created SmartLEssBundle
Lauri Kotilainen
@rytmis
What does that do, then?
dimtabu
@taburetkin
you know there is bem methodology in development
Lauri Kotilainen
@rytmis
Sure, yeah.
dimtabu
@taburetkin

assume i have this file structure

app
    control1
        control1.js
        control1.html
        control1.less
    control2
        control2.js
        control2.html
        control2.less

and so one
so i allready can bundle js - its native
i have own bundle for html templates, its simple
and i have to get the last one - less bundle for that purpose

now i can do that

            var cssbundle = new SmartLessBundle("~/bundles/css/")
            .NonOrdering()
            .Include("~/Content/bootstrap/bootstrap.less",new SmartLessFileTransform())
            .Include("~/Content/font-awesome/less/font-awesome.less", new SmartLessFileTransform())
            .IncludeDirectory("~/Content/less", "*.less", true)
            .IncludeDirectory("~/app/v01", "*.less", true);

Smartbundle do compile once, after all files are joined

dimtabu
@taburetkin
its very raw, thats why i include file transform in bootstrap.less and font-awesom,
filetransform normilizes import directives inside less files via regex
and i asume that i dont use import directive at all in my own less files
but it do the trick
Lauri Kotilainen
@rytmis
So that does what, concatenates your files together and then runs the transform on them?
dimtabu
@taburetkin
yap, once
Lauri Kotilainen
@rytmis
Alright.
dimtabu
@taburetkin
i often saw questions on stackoverflow about "why my variables are missing if i include few less files in bundle"
so, i start to look for updates of dotless and found that there is no news from 2015 :))
Daniel Hoelbling-Inzko
@Tigraine
Same goes for me - I haven't worked in the .NET space for 6 years now so I mostly try to look after the community and invite people to contribute.. But besides from @rytmis not a lot has happened in the last year or so..
And the codebase is not really the greatest of them all - it's now a pretty straight port from the less.js implementation (at least it was 3-4 years ago) so that's where the regex stuff came from..
Lauri Kotilainen
@rytmis
I've copied over 532 tests from the dotless codebase and I've got 180 of them currently passing with my ANTLR-based implementation. There are a lot of things I haven't yet given thought to -- such as keeping track of source lines, output compression, you name it. But I'm concentrating now on getting the basic parser-evaluator step to a decent shape.
One of the key things I'm trying to do differently is mixin and variable scoping. I'm trying to make this work so that the evaluation step will store all of them in a way that allows for fast lookups.
Some of the freakier parts of dotless that are scary to touch are: selector generation (combinatorial explosion with parent selectors), extenders and media bubbling. All of those seem sort of bolted-on. I'm aiming for an evaluation model that would be easier to follow.
Daniel Hoelbling-Inzko
@Tigraine
I'd suggest checking the less.js code - how they built it there.. Because I think if they improved these parts we could see how they did it
Because James rewrote the dotless parser some years back to be a pretty 1:1 port of the JS codebase
Lauri Kotilainen
@rytmis
I did consider that, but right now, I find it more motivating to hack with the new parser. :)
Booster2ooo
@Booster2ooo
Thanks a lot for your efforts Lauri, the dotLess project is a super nice idea, keep on rocking!