Coder Social home page Coder Social logo

Further Notes On Extends about less-docs HOT 5 OPEN

less avatar less commented on May 29, 2024
Further Notes On Extends

from less-docs.

Comments (5)

seven-phases-max avatar seven-phases-max commented on May 29, 2024

Don't understand: Notice that the Extending selector was grouped before the Extended selector. ...

I guess this means something like:

.questions:extend(.answers) {
    background: blue;
}

.answers {
    color: red;
}

with result:

.questions {
  background: blue;
}
.answers,
.questions {
  color: red;
}

I.e. .answers goes first in the list even if defined after .questions. (Probably it's too minor stuff to be mentioned at all)

from less-docs.

lukeapage avatar lukeapage commented on May 29, 2024

Except its reverse.. the extending selector goes last in the list? (I guess depending on the definition of extending selector). Also the xamples that were around this were the wrong way round too. I think I worked it into some of the sentences anyway that it is added on to the end of the selector list.

from less-docs.

jonschlinkert avatar jonschlinkert commented on May 29, 2024

I did all of the initial docs for extends while we were still discussing how you were going to implement it, so I imagine a lot of it was wrong

from less-docs.

seven-phases-max avatar seven-phases-max commented on May 29, 2024

Actually those "extending" and "extended" labels are not so easy to define unambiguously. Hence sometimes we can even confuse ourselves.
For example a:extend(b) looks like a extends b. So we may say that

a is the "extending" and b is the "extended".

However, since it's a who inherites b's properties, it is also true that

a is extended by b's properties

so it's

a is extended by b

so it's

a is the "extended" and b is the "extending"

:)

It all depends on how exactly one defines "extend" (as English word not as LESS keyword) in context of CSS classes... and the flip point is very thin and subtle... (Luckily examples make things unambiguous).

from less-docs.

lukeapage avatar lukeapage commented on May 29, 2024

Cool Jon, thanks, makes sense now & feel free to critique or add to the
extend documentation

from less-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.