question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Placeholder existence check

See original GitHub issue

Coming from https://github.com/nex3/sass/pull/821, can placeholder existance checks be added? Checking existence, especially within the current (@media) scope, would be useful.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
robwierzbowskicommented, Jan 15, 2019

BTW, I no longer have a need for this feature. Removing myself from the discussion 👋🏼

0reactions
nex3commented, Jan 18, 2019

The problem with trying to do the same thing as we do with variables is that style rules fundamentally don’t work the same way Sass variables do. They’re declarative, they cascade, and they apply selectively based on the structure of the document which isn’t known at compile-time. All of this makes the tools we use for dealing with variables inapplicable to selectors. Put another way, the question “has Sass compiled a style rule that contains this simple selector yet” doesn’t map to any semantic insight about the way the document is being styled.

To put this in perspective, I’m building quite a complicated project: a game-engine using only CSS and HTML. It’s coming along nicely, and I’m finding work-arounds all over the place. But having detection for these place-holders would mean that a user of the engine could override defaults rather than importing the defaults they need. Perhaps I could walk through with you my problem at some point and you could possibly come up with some better solutions? It’s very possible I’ve missed something I could use instead.

Style rules have a built-in mechanism for overriding defaults: the cascade. I recommend you use that, possibly wrapped with mixins if you want to control the specifics of what people can override.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check if placeholder text already exists within a string
Is there any way to check if the placeholder text already exists in the #error message? Here's a fiddle. I'm sorry it's so...
Read more >
how to check if a label exists in a placeholder - MSDN
If you already know the ID of the label, you could simply use the FindControl method on the PlaceHolder, like: Label lbl =...
Read more >
Manual :: Checks whether the placeholder exists
Checks whether the placeholder exists in the template, returns the name of the (first) block that contains the specified placeholder.
Read more >
ByPlaceholderText
This will search for all elements with a placeholder attribute and find one that matches the given TextMatch . <input placeholder="Username" ...
Read more >
Specify default rendering for placeholder in partial design
If 2 is true - open datasource dialog of Ambient Video Container find this datasource item, them verify if Video rendering is present...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found