Especially when coming from a framework like React, it might feel very tempting to start creating a component wrapper around the input (i.e. <input> becomes <Input/>) and add your custom event handlers in there.This is a great approach in React, but not so much in Svelte. Why, you ask?Well, Svelte (at least in its current form, v3) really shines when you have native DOM elements at your disposal. You can use transition directives, conditionally switch CSS classes, bind to the current value with ease, and more.
- Oct 2020
-
medium.com medium.com
-
-
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
-
stackoverflow.com stackoverflow.com
-
The Moov atom can only exist after recording is complete when the relevant metadata can now be created for the stored data.
-
-
svelte.dev svelte.dev
-
Auto-subscription only works with store variables that are declared (or imported) at the top-level scope of a component.
-
-
stackoverflow.com stackoverflow.com
-
setContext / getContext can only be used once at component init, so how do you share your API result through context? Related: how would you share those API results if the call was made outside of a Svelte component, where setContext would be even more out of the question (and the API call would arguably be better located, for separation of concerns matters)? Well, put a store in your context.
-
-
svelte.dev svelte.dev
-
stackoverflow.com stackoverflow.com
-
I used a "specific function". But maybe it could be done within a derived store. A kind of auto reset on ... But I think there is no elagant solution, so I stick with the specific function.
-
-
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.
-
In the end this is an opinionated framework, and you can limit developers as you like, but I think it's a shame to block the possibility of what is available natively in the web.
Tags
- trying to prevent one bad thing leading to people doing/choosing an even worse option
- Svelte: CSS encapsulation
- arbitrary limitations
- important point
- missing out on the benefits of something
- unfortunate limitations
- Svelte: how to affect child component styles
- opinionated
- arbitrary limitations leading to less-than-ideal workarounds
- key point
- +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?
-
-
-
Your solution is a very basic. The case above is more complex because using your solution you can't manipulate with fetched data outside of template and even outside {#await / } tag. So, if you need a read-only solution it's good but otherwise, it won't help you.
-
-
svelte.dev svelte.dev
-
The value attribute of an input element or its children option elements must not be set with spread attributes when using bind:group or bind:checked. Svelte needs to be able to see the element's value directly in the markup in these cases so that it can link it to the bound variable.
Tags
Annotators
URL
-
-
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.
-
-
exploringjs.com exploringjs.com
-
The module specifier is always fixed. That is, you can’t change what you import depending on a condition. And you can’t assemble a specifier dynamically.
-
-
tailwindcss.com tailwindcss.com
-
Inline styles can't target states like hover or focus, but Tailwind's pseudo-class variants make it easy to style those states with utility classes.
-
-
github.com github.com
-
Force everything to the git root per NPM lameness
-
- Aug 2020
-
stackoverflow.com stackoverflow.com
-
Sadly, bash can't handle long options which would be more readable, i.e.:
-
- Jul 2020
-
amp.dev amp.dev
-
While stylesheets can be reworked relatively easily with AMP by inlining the CSS, the same is not true for JavaScript. The tag 'script' is disallowed except in specific forms. In general, scripts in AMP are only allowed if they follow two major requirements: All JavaScript must be asynchronous (i.e., include the async attribute in the script tag). The JavaScript is for the AMP library and for any AMP components on the page. This effectively rules out the use of all user-generated/third-party JavaScript in AMP except as noted below.
-
The problem is that this is an external stylesheet reference. In AMP, to keep the load times of documents as fast as possible, you cannot include external stylesheets.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
These seem to be better reasons to support sub-nanosecond resolution. I think either storing picoseconds or storing sec fraction as 64-bit integer are better approaches than storing a rational. However, either change would be very invasive, and it seems unlikely to be worth the effort.
-
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Let me point out that with this patch applied, (nil..nil).cover?(1) would become returning true rather than raising an error. Note that nil..nil has been valid for all past versions of ruby.
Tags
Annotators
URL
-
-
stackoverflow.com stackoverflow.com
-
VII, after the map block, consider arr.each_with_object([]) do |(converted_val, orig_val),uniques|...end.
-
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
-
- Jun 2020
-
-
No built-in syntax for looping
-
-
stackoverflow.com stackoverflow.com
-
rails.lighthouseapp.com rails.lighthouseapp.com
-
Seems a little unfortunate that there is no obvious way to edit or remove my previous reply.
-
- May 2020
-
unix.stackexchange.com unix.stackexchange.com
-
You might not care today, but your approach doesn’t allow you to have multiple spaces (Philippines 6014), leading spaces, trailing spaces, or tabs.
-
-
docs.gitlab.com docs.gitlab.com
-
Not merge the values of the keys.
This is one of the biggest limatations of
<<: *anchor: it overwrites values of keys. It's too heavy-handed and therefore of limited use. You can only use it if you don't mind keys getting overwritten (such as if you are going to overwrite the keys below the<<:.). -
GitLab will perform a reverse deep merge based on the keys
-
-
docs.gitlab.com docs.gitlab.com
-
With a few API endpoints you can use a GitLab CI/CD job token to authenticate with the API: Get job artifacts Pipeline triggers Release creation
Tags
Annotators
URL
-
-
gitlab.com gitlab.com
-
There will be limits placed on what will and will not be masked. This will include accounting for enough entropy to make sense (e.g. don't mask a variable that is just set to a word.) and are not multi-line.
-
-
support.google.com support.google.com
-
Filters require up to 24 hours before they are applied to your data.
-
-
gitlab.com gitlab.com
-
I never understood why we enforce The commit body must not contain more than 72 characters per line.
-
-
github.com github.com
-
Traditional CMSes are "coupled", which means that the CMS also takes care of the presentation layer responsible for delivering the content to the clients. The content and the presentation are closely interlinked. Typically, content managers create and manage their content through tools like WYSIWYG editors. The CMS then delivers the content according to the front-end delivery layer built into the CMS. Typically, a traditional CMS supports your websites but not much else.
-
-
github.com github.com
-
I'll change at some point the format of the JSON so that the link can also be directly stored. That way it would be mandatory/useful to provide it with the JSON.
-
-
-
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.
-
- Apr 2020
-
www.iubenda.com www.iubenda.com
-
Google Tag Manager allows you to avoid tagging scripts as described below, although this is limited to a certain category of scripts – scripts that are not positional/do not define a position. It, therefore, does not handle embed scripts such as those related to advertising banners, youtube video widgets, facebook like buttons etc.
-
-
en.wikipedia.org en.wikipedia.org
-
Doesn't help decide between multiple requirements with same rank
Tags
Annotators
URL
-
-
basiccraft.wordpress.com basiccraft.wordpress.com
-
Gray discusses the ‘bandwidth of consciousness’. He cites figures from Vincent Deary who has calculated that overall we process some 14 million bits of information per second. But the bandwidth of conscious action and thought, however, is only 18 bits!
-
- Mar 2020
-
www.iubenda.com www.iubenda.com
-
This method has the advantage of being quite fast but with the limit of working only for scripts that don’t require a specific position. Google Tag Manager is therefore not effective for all scripts that display a specific element in a specific position of the page (such as the Facebook Like button).
-
- Jan 2020
-
stackoverflow.com stackoverflow.com
-
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
-
marinintim.com marinintim.comFor fun1
-
Seriousness is bad. It does not allow to go beyond what is accepted now , so there is a risk of being stuck in a local maximum. At first, the new formats seem ridiculous and incomprehensible (see, for example, a twitter feed from a decade ago ), but only in this way do we find something truly working.
Tags
Annotators
URL
-
-
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.
-
-
github.com github.com
-
caution do not use package.json for the folder name if you want to clone this project to your machine - it will break yarn (An unexpected error occurred: "EISDIR: illegal operation on a directory, read".).
-
-
academic.oup.com academic.oup.com
-
plasmid-based circuits suffer from multiple limitations: high intercellular variation in gene expression, genetic instability from random partitioning of plasmids during cell division, and plasmid loss in environments for which antibiotic use could disrupt native microbial communities or is economically infeasible
Tags
Annotators
URL
-
- 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?
-
- Mar 2018
-
ryancordell.org ryancordell.org
-
small beginnings help instructors focus on what DH they can teach effectively. To be frank, I was not prepared to teach all of the DH in that “Intro to Digital Humanities” course I proposed.
I appreciate the author's recognition of his limitations. I do not think teachers ought to assume they are able to "do it all". My teacher did a great job this term understanding her personal limitations by bringing in outside sources to assist her in teaching digital tools. It not only made class interesting by switching up the instructor, but it also provided us with another informed resource to reference.
-
- Feb 2014
-
cyber.law.harvard.edu cyber.law.harvard.edu
-
These rights are quali- fied, however, by the application of various limitations set forth in the next several sections of the Act, §§107 through 122. Those sections, typically entitled “Limitations on exclusive rights,” include, for example, the principle of “fair use” (§107), permission for limited library archival reproduction, (§108), and the doctrine at issue here, the “first sale” doctrine (§109)
- §107 - the principle of “fair use”
- §108 - permission for limited library archival reproduction
- §109 - the “first sale” doctrine
-
-
www.rpajournal.com www.rpajournal.com
-
Finally, with the current technology, some types of writing are probably outside the reach of MOOCs. There is no literature to suggest that either AES or CPR can accurately assess figurative or creative pieces, or original research pieces. Some type of peer review software that relies heavily on the students being closer to experts in their own right might bring these types of writing into larger courses; but, not every undergraduate course that uses writing as a form of assessment will translate to the MOOC format.
-
- Sep 2013
-
rhetoric.eserver.org rhetoric.eserver.org
-
It is clear, then, that rhetoric is not bound up with a single definite class of subjects, but is as universal as dialectic; it is clear, also, that it is useful. It is clear, further, that its function is not simply to succeed in persuading, but rather to discover the means of coming as near such success as the circumstances of each particular case allow. In this it resembles all other arts. For example, it is not the function of medicine simply to make a man quite healthy, but to put him as far as may be on the road to health; it is possible to give excellent treatment even to those who can never enjoy sound health.
defining rhetoric's worth and limitations
Tags
Annotators
URL
-