26 Matching Annotations
- Mar 2021
-
-
Dave Rupert has a good solution that uses an input's invalid event. Instead of using the :invalid pseudo selector, he adds a CSS class to the input when it becomes invalid. We will extend this approach by removing the CSS class when the element becomes valid again.
-
- Feb 2021
-
github.com github.com
-
A.joins(:b) .where( A.arel_table[:something_a].eq('xxx').or(B.arel_table[:something_b].eq('yyy')) )
-
- Jan 2021
-
-
Change any of the <option> by double clicking on the number.
-
-
forums.theregister.com forums.theregister.com
-
It won't work if $HOME is not under /home. Really. Not even if you softlink. You need a bind mount
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
Thanks so much for the reply! Due to space limitations for comments, I have appended my reply to my original question. Thanks again! (P.S. I can't up-vote your reply until my rep hits 15... Sorry about that.)
-
- Oct 2020
-
tech.ebayinc.com tech.ebayinc.com
-
Offsetting the rules of a logic-less template requires a lot of helper methods.
-
-
-
I had this problem and figured out how to make something like this work with the compiler quirks.
-
-
github.com github.com
-
React hook for creating a value exactly once. useMemo doesn't give this guarantee unfortunately - https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
-
- Sep 2020
-
svelte.dev svelte.dev
-
github.com github.com
-
The problem with working around the current limitations of Svelte style (:global, svelte:head, external styles or various wild card selectors) is that the API is uglier, bigger, harder to explain AND it loses one of the best features of Svelte IMO - contextual style encapsulation. I can understand that CSS classes are a bit uncontrollable, but this type of blocking will just push developers to work around it and create worse solutions.
Tags
- Svelte: CSS encapsulation
- important point
- key point
- arbitrary limitations leading to less-than-ideal workarounds
- Svelte: how to affect child component styles
- missing out on the benefits of something
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- +0.9
Annotators
URL
-
-
github.com github.com
-
Would style .classInChild from your parent. The only drawback is that you might need an extra wrapping element.
-
-
github.com github.com
-
For my simple tooltip example, I could create a TooltipHitbox component with a <slot/> inside a <div use:myTooltip={tooltipProp}> and then wrap MatButton instances with that component.
-
-
github.com github.com
-
Also, I'm starting to wonder if maybe it's okay to have multiple spreads? If the alternative to <Foo {...a} {...b} {...c} d={42}> is that people will write <Foo {...Object.assign({}, a, b, c)} d={42}> anyway, then do we gain anything with the constraint?
-
-
github.com github.com
-
{#each section as {tag, is_self_closing, props, content}} {#if is_self_closing} <{tag} {...props} /> {:else} <{tag} {...props}>{content}</{tag}> {/if}
-
-
github.com github.com
-
Even without going to that extreme, the constraint of having a single <style> can easily force component authors to resort to the kinds of classes-as-namespaces hacks that scoped styles are supposed to obviate.
-
-
github.com github.com
-
:global just feels like a hack for a feature that should already be there.
-
-
github.com github.com
-
Force everything to the git root per NPM lameness
-
- Jul 2020
-
stackoverflow.com stackoverflow.com
-
Creating and calling a default proc is a waste of time, and Cramming everything into one line using tortured constructs doesn't make the code more efficient--it just makes the code harder to understand.
The nature of this "answer" is a comment in response to another answer. But because of the limitations SO puts on comments (very short length, no multi-line code snippets), comment feature could not actually be used, so this user resorted to "abusing" answer feature to post their comment instead.
See
-
- May 2020
-
-
This is it. I'm done with Page Translator, but you don't have to be. Fork the repo. Distribute the code yourself. This is now a cat-and-mouse game with Mozilla. Users will have to jump from one extension to another until language translation is a standard feature or the extension policy changes.
-
None of these methods are ideal and honestly, I'd only blame Mozilla for this. They dismiss all our efforts as incorrect but refuse to provide the correct solution.
-
- Jan 2020
-
unix.stackexchange.com unix.stackexchange.com
-
ssh doesn't let you specify a command precisely, as you have done, as a series of arguments to be passed to execvp on the remote host. Instead it concatenates all the arguments into a string and runs them through a remote shell. This stands out as a major design flaw in ssh in my opinion... it's a well-behaved unix tool in most ways, but when it comes time to specify a command it chose to use a single monolithic string instead of an argv, like it was designed for MSDOS or something!
-
-
unix.stackexchange.com unix.stackexchange.com
-
I think, it's better to replace \n symbol with some other symbol, and then work as usual:
-
- Dec 2019
-
reactjs.org reactjs.org
-
This problem can also come up when you use npm link or an equivalent. In that case, your bundler might “see” two Reacts — one in application folder and one in your library folder. Assuming myapp and mylib are sibling folders, one possible fix is to run npm link ../myapp/node_modules/react from mylib. This should make the library use the application’s React copy.
-
- Nov 2019
-
material-ui.com material-ui.com
-
This does not set the native input element to indeterminate due to inconsistent behavior across browsers. However, we set a data-indeterminate attribute on the input.
-
-
gist.github.com gist.github.com
-
// This is not really a mock, but jest prevents out of scope // variables unless prefixed with "mock".
-
-
stackoverflow.com stackoverflow.com
-
cant you see he has only 11 reputations, and how can he comment?
-