Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

info about extends #73

Closed
lukeapage opened this issue Mar 15, 2013 · 11 comments
Closed

info about extends #73

lukeapage opened this issue Mar 15, 2013 · 11 comments

Comments

@lukeapage
Copy link
Member

can use http://www.scottlogic.co.uk/2013/03/extends-in-less/ as a base

@jonschlinkert
Copy link

@lukeapage unless someone else beats me to it, I will be sure to use that blog post as a base for the extend documentation. good write up

@extemporalgenome
Copy link

It'd be useful to have concrete information on the mechanism. For example, it's clear to me why (from the blog post) the .button-red example works, but not why the .add_ie_support use of .first:extend(:nth-child(1)) produces tr.first rather than just .first. With my rather limited understanding of this feature, I'd think it'd usually be more useful to produce exactly what is specified, rather than having the result prefixed with the dynamically discovered selector. In other words, if I wanted tr.first in the output, I would have specified tr.first:extend(:nth-child(1) all) -- what then is the benefit of this implicit prefixing?

@maranomynet
Copy link

+1 what @extemporalgenome said.

And why/how does :extend(:nth-child(1)) match the selector tr:first-child(1) at all?

And what if I have multiple .menu { ... } declarations - what happens when I do .menu2:extend(.menu') ?

And what if when I extend a selector inside one @media block, and that same selector also exists inside another @media block. What then?

What happens if I extend a mixin? i.e. .clearfix() { ... } .foo:extend(.clearfix) {}

@maranomynet
Copy link

Hmmm... I found the test files and am now reading through those.

@SomMeri
Copy link
Member

SomMeri commented Oct 7, 2013

I started to write about extend on less4j wiki. I will be happy to add the same or similar to less.js documentation too once it is finished.

I just do not want to do it while less.js documentation refactoring is in progress.

@lukeapage
Copy link
Member Author

I was going to write some more info for the website, starting with porting
the blog article I wrote.. If you write some more for the java version I
will consider putting that on the site. I'm not 100% sure on what the
current state of the documentation refactor is so I've been planning for
some time to make updates to the website. Plan is to release 1.5 then do
that.. then more bugfixes and 1.5.1.

@SomMeri
Copy link
Member

SomMeri commented Oct 8, 2013

@LukePage Whichever you prefer. I will write some more for java in any case, I always document what I ported. It helps me to remember what I intended to implement later on (if that makes sense).

On documentation: Altrough I would like to help with less.js, but I do not have enough time to learn it right now. Starting with new codebase requires bigger time chunks that I have available. I also wanted to catch up with less4j first, it should have at least those features that bootstrap uses.

However, I could be able to process at least simple pull requests for documentation in the meantime. Some of them seem to be simple typo fixes and do not require that much learning as codebase. People are more likely to contribute if they do not see huge backlog of unanswered pull requests.

What do you think?

@lukeapage
Copy link
Member Author

@SomMeri sorted it out now..

@lukeapage lukeapage reopened this Oct 27, 2013
@sytelus
Copy link

sytelus commented Nov 22, 2013

@SomMeri - thanks for excellent write up and especially making clear the syntax and example for multiple extends.

@lukeapage - looking forward to see your page merged with @SomMeri.

@sytelus
Copy link

sytelus commented Nov 23, 2013

@SomMeri - thanks again for good writeup. I'd put question for how to use multiple inheritance on StackOverflow and your article was the only thing I found after hours of search that gave an answer. Here's my solution: http://stackoverflow.com/a/20158738/207661

@lukeapage
Copy link
Member Author

you can see the current final write up here
https://github.com/less/less-docs/blob/master/content/features/extend.md

I would really really like to get our new docs as good as the current ones and replacing the website ASAP. :S

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants