Ads
Tuesday, August 31, 2021
Clear today!
With a high of F and a low of 61F. Currently, it's 71F and Clear outside.
Current wind speeds: 10 from the Southeast
Pollen: 7
Sunrise: August 31, 2021 at 06:19PM
Sunset: September 1, 2021 at 07:23AM
UV index: 0
Humidity: 42%
via https://ift.tt/2livfew
September 1, 2021 at 10:05AM
Olsam raises $165M to buy up and scale consumer and B2B Amazon Marketplace sellers
On the heels of Heroes announcing a $200 million raise earlier today, to double down on buying and scaling third-party Amazon Marketplace sellers, another startup out of London aiming to do the same is announcing some significant funding of its own. Olsam, a roll-up play that is buying up both consumer and B2B merchants selling on Amazon by way of Amazon’s FBA fulfillment program, has closed $165 million — a combination of equity and debt that it will be using to fuel its M&A strategy, as well as continue building out its tech platform and to hire more talent.
Apeiron Investment Group — an investment firm started by German entrepreneur Christian Angermayer — led the Series A equity round, with Elevat3 Capital (another Angermayer firm that has a strategic partnership with Founders Fund and Peter Thiel) also participating. North Wall Capital was behind the debt portion of the deal. We have asked and Olsam is only disclosing the full amount raised, not the amount that was raised in equity versus debt. Valuation is also not being disclosed.
Being an Amazon roll-up startup from London that happens to be announcing a fundraise today is not the only thing that Olsam has in common with Heroes. Like Heroes, Olsam is also founded by brothers.
Sam Horbye previously spent years working at Amazon, including building and managing the company’s business marketplace (the B2B version of the consumer marketplace); while co-founder Ollie Horbye had years of experience in strategic consulting and financial services.
Between them, they also built and sold previous marketplace businesses, and they believe that this collective experience gives Olsam — a portmanteau of their names, “Ollie” and “Sam” — a leg up when it comes to building relationships with merchants; identifying quality products (versus the vast seas of search results that often feel like they are selling the same inexpensive junk as each other); and understanding merchants’ challenges and opportunities, and building relationships with Amazon and understanding how the merchant ecosystem fits into the e-commerce giant’s wider strategy.
Olsam is also taking a slightly different approach when it comes to target companies, by focusing not just on the usual consumer play, but also on merchants selling to businesses. B2B selling is currently one of the fastest-growing segments in Amazon’s Marketplace, and it is also one of the more overlooked by consumers. “It’s flying under the radar,” Ollie said.
“The B2B opportunity is very exciting,” Sam added. “A growing number of merchants are selling office supplies or more random products to the B2B customer.”
Estimates vary when it comes to how many merchants there are selling on Amazon’s Marketplace globally, ranging anywhere from 6 million to nearly 10 million. Altogether those merchants generated $300 million in sales (gross merchandise value), and it’s growing by 50% each year at the moment.
And consolidating sellers — in order to achieve better economies of scale around supply chains, marketing tools and analytics, and more — is also big business. Olsam estimates that some $7 billion has been spent cumulatively on acquiring these businesses, and there are more out there: Olsam estimates there are some 3,000 businesses in the U.K. alone making more than $1 million each in sales on Amazon’s platform.
(And to be clear, there are a number of other roll-up startups beyond Heroes also eyeing up that opportunity. Raising hundreds of millions of dollars in aggregate, others that have made moves this year include Suma Brands [$150 million], Elevate Brands [$250 million], Perch [$775 million], factory14 [$200 million], Thrasio [currently probably the biggest of them all in terms of reach and money raised and ambitions], Heyday, The Razor Group, Branded, SellerX, Berlin Brands Group [X2], Benitago, Latin America’s Valoreo and Rainforest and Una Brands out of Asia.)
“The senior team behind Olsam is what makes this business truly unique,” said Angermayer in a statement. “Having all been successful in building and selling their own brands within the market and having worked for Amazon in their marketplace team – their understanding of this space is exceptional.”
from Amazon – TechCrunch https://ift.tt/3gOZfbe
via IFTTT
You want enabling CSS selectors, not disabling ones
I think this is good advice from Silvestar Bistrović:
An enabling selector is what I call a selector that does a job without disabling the particular rule.
The classic example is applying margin
to everything, only to have to remove it from the final element because it adds space in a place you don’t want.
.card {
margin-bottom: 1rem;
}
/* Wait but not on the last one!! */
.parent-of-cards :last-child {
margin-bottom: 0;
}
You might also do…
/* "Disabling" rule */
.card:last-child {
margin-bottom: 0;
}
But that’s maybe not as contextual as selecting from the parent.
Another variation is:
.card:not(:last-of-child) {
margin-bottom: 1rem;
}
That’s what
Silvestar refers to as “enabling” because you’re only ever applying this rule — not applying it and then removing it with another selector later. I agree that’s harder to understand and error-prone.Yet another example is a scoped version of Lobotomized Owls:
/* Only space them out if they stack */
.card + .card {
margin-top: 1rem;
}
I think gap
is where this is all headed in the long term. Put the onus on the parent, not the child, and keep it an enabling selector:
.parent-of-cards {
display: grid;
gap: 1rem;
}
Direct Link to Article — Permalink
The post You want enabling CSS selectors, not disabling ones appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
from CSS-Tricks https://ift.tt/3ruwXpN
via IFTTT
UK-based Heroes raises $200M to buy up more Amazon merchants for its roll-up play
Heroes, one of the new wave of startups aiming to build big e-commerce businesses by buying up smaller third-party merchants on Amazon’s Marketplace, has raised another big round of funding to double down on that strategy. The London startup has picked up $200 million, money that it will mainly be using to snap up more merchants. Existing brands in its portfolio cover categories like baby, pets, sports, personal health and home and garden categories — some of them, like PremiumCare dog chews, the Onco baby car mirror, gardening tool brand Davaon and wooden foot massager roller Theraflow, category best-sellers — and the plan is to continue building up all of these verticals.
Crayhill Capital Management, a fund based out of New York, is providing the funding, and Riccardo Bruni — who co-founded the company with twin brother Alessio and third brother Giancarlo — said that the bulk of it will be going towards making acquisitions, and is therefore coming in the form of debt.
Raising debt rather than equity at this point is pretty standard for companies like Heroes. Heroes itself is pretty young: it launched less than a year ago, in November 2020, with $65 million in funding, a round comprised of both equity and debt. Other investors in the startup include 360 Capital, Fuel Ventures and Upper 90.
Heroes is playing in what is rapidly becoming a very crowded field. Not only are there are tens of thousands of businesses leveraging Amazon’s extensive fulfillment network to sell goods on the e-commerce giant’s Marketplace; but some days it seems we are also rapidly approaching a state of nearly as many startups launching to consolidate these third-party sellers.
Many a roll-up play follows a similar playbook, which goes like this: Amazon provides the Marketplace to sell goods to consumers, and the infrastructure to fulfill those orders, by way of Fulfillment By Amazon and its Prime service. Meanwhile, the roll-up business — in this case Heroes — buys up a number of the stronger companies leveraging FBA and the Marketplace. Then, by consolidating them into a single tech platform that they have built, Heroes creates better economies of scale around better and more efficient supply chains, sharper machine learning and marketing and data analytics technology, and new growth strategies.
What is notable about Heroes, though — apart from the fact that it’s the first roll-up player to come out of the UK, and continues to be one of the bigger players in Europe — is that it doesn’t believe that the technology plays as important a role as having a solid relationship with the companies it’s targeting, key given that now the top Marketplace sellers are likely being feted by a number of companies as acquisition targets.
“The tech is very important,” said Alessio in an interview. “It helps us build robust processes that tie all the systems together across multiple brands and marketplaces. But what we have is very different from a SaaS business. We are not building an app, and tech is not the core of what we do. From the acquisitions side, we believe that human interactions ultimately win. We don’t think tech can replace a strong acquisition process.”
Heroes’ three founder-brothers (two of them, Riccardo and Alessio, pictured above) have worked across a number of investment, finance and operational roles (the CVs include Merrill Lynch, EQT Ventures, Perella Weinberg Partners, Lazada, Nomura and Liberty Global) and they say there have been strong signs so far of its strategy working: of the brands that it has acquired since launching in November, they claim business (sales) has grown five-fold.
Collectively, the roll-up startups are raising hundreds of millions of dollars to fuel these efforts. Other recent hopefuls that have announced funding this year include Suma Brands ($150 million); Elevate Brands ($250 million); Perch ($775 million); factory14 ($200 million); Thrasio (currently probably the biggest of them all in terms of reach and money raised and ambitions), Heyday, The Razor Group, Branded, SellerX, Berlin Brands Group (X2), Benitago, Latin America’s Valoreo and Rainforest and Una Brands out of Asia.
The picture that is emerging across many of these operations is that many of these companies, Heroes included, do not try to make their particular approaches particularly more distinctive than those of their competitors, simply because — with nearly 10 million third-party sellers today on Amazon globally — the opportunity is likely big enough for all of them, and more, not least because of current market dynamics.
“It’s no secret that we were inspired by Thrasio and others,” Riccardo said. “Combined with Covid-19, there has been a massive acceleration of e-commerce across the continent.” It was that, plus the realization that the three brothers had the right e-commerce, fundraising and investment skills between them, that made them see what was a “perfect storm” to tackle the opportunity, he continued. “So that is why we jumped into it.”
In the case of Heroes, while the majority of the funding will be used for acquisitions, it’s also planning to double headcount from its current 70 employees before the end of this year with a focus on operational experts to help run their acquired businesses.
from Amazon – TechCrunch https://ift.tt/3jttcj0
via IFTTT
Application-Specific Links
You know like https:
? That’s a URL Scheme. You’re probably familiar with the concept, thanks to others that come up in front-end development, like mailto:
. You can actually make your own, which is pretty cool. There are a lot of them.
I find that custom URL schemes come up the most with apps that are both web apps and native apps. For example, two that I use nearly every day: Notion and Figma. I love that the things I work on in these apps have URLs. URLs for everything! 🎉
And yet. When I grab the URL to a Notion page, which I do regularly to share with co-workers, I get a URL like…
https://www.notion.so/csstricks/...
That’s fine, and works to open that Notion page in the browser. But I prefer Notion-the-native-app. It’s Electron, so it’s still a web app I guess, but I don’t use it from my web browser, I use it from the application Notion.app
on my literal machine.
Geoff shared with me an article the other day that documents how easy it is to make an application’s browser URL open up in the native app instead:
Fortunately, Notion’s dev team thought about that, and built the
Thomas Frank, “How to Share Notion Links That Open Directly in the App”notion://
link protocol. If you replace thehttps://
portion of any Notion page link withnotion://
, your link will automatically open within the native app instead of a web browser.
That’s great that the native scheme is essentially the same as the web scheme, aside from the name. Thomas goes super deep on this with methods to alter the content of clipboard to replace Notion links with the custom scheme.
I just wanted to note a method I think works nicely for me. The trick isn’t to alter the links themselves, but to react to links that you know are Notion links by redirecting them to open in Notion.app
.
The trick, on Macs, is Choosy:
I prefer to set up Choosy such that it never asks me what browser to use, it just does it based on rules. So under the settings, I have a bunch of apps set up:
For Notion, I watch for links to Notion, and have it open up Notion… that’s it!
The other apps basically do the exact same thing. Works great.
One caveat though! Once in a blue moon, I have to come in here and flip certain applications off. For example, a password reset flow might send me to slack.com
or something, for a certain page as part of the flow that is only available through the web. If Choosy is doing its thing, it tries to force that page to open in Slack.app
, which it won’t, and you can kinda get trapped. So, I have to come in here and flip it off temporarily.
The post Application-Specific Links appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
from CSS-Tricks https://ift.tt/3jxDK0E
via IFTTT
US giants top tech industry’s $100M+ a year lobbying blitz in EU
The scale of the tech industry’s spending to influence the European Union’s tech policy agenda has been laid out in a report published today by Corporate Europe Observatory and Lobbycontrol — which found hundreds of companies, groups and business associations shelling out a total of €97 million (~$115M) annually lobbying EU institutions.
The level of spending makes tech the biggest lobby sector in the region — ahead of pharma, fossil fuels, finance, and chemicals — per the report by the two lobbying transparency campaign groups.
The EU has a raft of digital legislation in train, including the Digital Markets Act, which is set to apply ex ante controls to the biggest ‘gatekeeper’ platforms to promote fair competition in the digital market by outlawing a range of abusive practices; and the Digital Services Act, which will increase requirements on a swathe of digital businesses — again with greater requirements for larger platforms — to try to bring online rules in line with offline requirements in areas like illegal content and products.
Tackling online disinformation and threats to democratic processes — such as by updating the EU’s rules for political ads running online and tighter regulation of online ad targeting more generally is also being eyed by Brussels-based lawmakers.
The bloc is also in the process of agreeing a risk-based framework for applications of artificial intelligence.
Data reuse is another big EU regulatory focus.
At the same time, enforcement of the EU’s existing data protection framework (GDPR) — which is widely perceived to have been (mostly) weakly applied against tech giants — is another area where tech giants may be keen to influence regional policy, given that uniformly vigorous enforcement could threaten the surveillance-based business models of online ad giants like Google and Facebook.
Instead, multiple GDPR complaints against the pair are still sitting undecided on the desk of Ireland’s Data Protection Commission.
A small number of tech giants dominant EU lobbying, according to the report, which found ten companies are responsible for almost a third of the total spend — namely: Google, Facebook, Microsoft, Apple, Huawei, Amazon, IBM, Intel, Qualcomm and Vodafone — who collectively spend more than €32M a year to try to influence EU tech policy.
Google topped the lobbying list of Big Tech big spenders in the EU — spending €5.8M annually trying to influence EU institutions, per the report; followed by Facebook (€5.5M); Microsoft (€5.3M); Apple (€3.5M); and Huawei (€3M).
Unsurprisingly, US-based tech companies dominate industry lobbying in the EU — with the report finding a fifth of the companies lobbying the bloc on digital policy are US-based — although it suggests the true proportion is “likely even higher”.
While China (or Hong Kong) based companies were only found to comprise less than one per cent of the total, suggesting Chinese tech firms are so far not invested in EU lobbying at anywhere near the level of their US counterparts.
“The lobbying surrounding proposals for a Digital Services pack, the EU’s attempt at reining in Big Tech, provides the perfect example of how the firms’ immense budget provides them with privileged access: Commission high-level officials held 271 meetings, 75 percent of them with industry lobbyists. Google and Facebook led the pack,” write the pair of transparency campaign groups.
The report also shines a light on how the tech industry routinely relies upon astroturfing to push favored policies — with tech companies not only lobbying individually but also being collectively organised into a network of business and trade associations that the report dubs “important lobby actors” too.
Per the report, business associations lobbying on behalf of Big Tech alone have a lobbying budget that “far surpasses that of the bottom 75 per cent of the companies in the digital industry”.
Such a structure can allow the wealthiest tech giants to push preferred policy positions under a guise of wider industry support — by also shelling out to fund such associations which then gives them an outsized influence over their lobbying output.
“Big Tech’s lobbying also relies on its funding of a wide network of third parties, including think tanks, SME and startup associations and law and economic consultancies to push through its messages. These links are often not disclosed, obfuscating potential biases and conflicts of interest,” the pair note, going on to highlight 14 think tanks and NGOs they found to have “close ties” to Big Tech firms.
“The ethics and practice of these policy organisations varies but some seem to have played a particularly active role in discussions surrounding the Digital Services pack, hosting exclusive or skewed debates on behalf of their funders or publishing scaremongering reports,” they continue.
“There’s an opacity problem here: Big Tech firms have fared poorly in declaring their funding of think tanks – mostly only disclosing these links after being pressured. And even still this disclosure is not complete. To this, Big Tech adds its funding of SME and startup associations; and the fact that law and economic experts hired by Big Tech also participate in policy discussions, often without disclosing their clients or corporate links.”
The 14 think tanks and NGOs the report links to Big Tech backers are: CERRE; CDI, EPC, CEPS, CER, Bruegel, Lisbon Council, CDT, TPN, Friends of Europe, ECIPE, European Youth Forum, German Marshall Fund and the Wilfried Martens Centre for European Studies.
The biggest spending tech giants were contacted for comment on the report. We’ll update this article with any response.
We have also reached out to the European Commission for comment.
The full report — entitled The Lobby Network: Big Tech’s Web of Influence in the EU — can be found here.
from Amazon – TechCrunch https://ift.tt/3zwl0E1
via IFTTT
Monday, August 30, 2021
Mostly Clear today!
With a high of F and a low of 60F. Currently, it's 69F and Clear outside.
Current wind speeds: 14 from the Southeast
Pollen: 7
Sunrise: August 30, 2021 at 06:18PM
Sunset: August 31, 2021 at 07:25AM
UV index: 0
Humidity: 42%
via https://ift.tt/2livfew
August 31, 2021 at 10:03AM
CSS Pseudo Commas
A bonafide CSS trick if there ever was one! @ShadowShahriar created a CodePen demo that uses pseudo-elements to place commas between list items that are displayed inline, and the result is a natural-looking complete sentence with proper punctuation.
How it works
The trick? First, it’s to make an unordered list an inline element with no markers or spacing:
ul {
padding: 0;
margin: 0;
display: inline;
list-style-type: none;
}
Next, we display list items inline so they flow naturally as text in a sentence:
li {
display: inline;
}
Then we add commas between list items by selecting their ::after
pseudo-element, and setting it’s content
property with a comma (,
) value.
li::after{
content: var(--separator);
}
Oh, but wait! What about the ol’ Oxford comma? Use :nth-last-of-type()
to select the second-to-last list item, and set its ::after
pseudo-element’s content
property to ", and"
before the last list item.
li:nth-last-of-type(2)::after{
content: ", and ";
}
We’re not done. @ShadowShahriar considers an edge case where there are only two items. All we need is to display an “and” between those two items, so:
li:first-of-type:nth-last-of-type(2)::after {
content: " and ";
}
I had to look that up on Selectors Explained to make sure I was reading it correctly. That’s saying:
The
after
pseudo-element… of a
<li>
element provided it is the first of its type in its parent and the nth of its type from the end (formula) in its parent.
What a mouthful! The final touch is a period at the end of the list:
li:last-of-type::after {
content: ".";
}
Using custom properties
We just looked at an abridged version of the actual code. @ShadowShahriar does a nice thing by setting a comma and the “and” as custom properties:
ul {
--separator: ",";
--connector: "and";
padding: 0;
margin: 0;
display: inline;
list-style-type: none;
}
That way, when we can swap those out for other ways to separate list items later. Nice touch.
This caught my eye not only for its clever use of pseudo-element trickery, but also for its simplicity. It’s using tried and true CSS principles in a way that supports semantic HTML — no extra classes, elements, or even JavaScript to help manipulate things. It almost makes me wonder if HTML could use some sort of inline list element (<il>
anyone???) to help support sentences convey list items without breaking out of a paragraph.
Direct Link to Article — Permalink
The post CSS Pseudo Commas appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
from CSS-Tricks https://ift.tt/3Bhptex
via IFTTT
A majority of tech workers support antitrust legislation enforcement
With the arrival of U.S. Federal Trade Commission Chair Lina Khan, breaking up Big Tech has reemerged as a major policy discussion in Washington. The issue seems to be bipartisan, with Republicans and Democrats alike in favor of stemming monopolistic behavior in the tech industry. Of course, the situation on the ground is more nuanced.
One month after the House Judiciary Committee voted to advance five bipartisan bills that would force Amazon, Apple, Microsoft, Facebook and Google to split up or walk away from core businesses, Republican committee members introduced new legislation to give Americans legal recourse against online censorship by Big Tech companies. The more conservative-driven policy measures also propose greater transparency into content moderation practices by Big Tech.
This sparring between lawmakers on how to regulate Big Tech is not expected to end anytime soon. But as the U.S. ushers in a new era of digital transformation accelerated by the pandemic, Congress stands firmly united in the belief that Big Tech’s power must be checked to preserve the free market.
As it stands now, small competitors and consumers alike have little choice but to be tethered to Big Tech to participate in today’s modern economic engine. And coming out of the pandemic, the five biggest tech giants are growing at breathtaking speed unseen before in the history of capitalism.
Big Tech companies have come out strongly against regulation that would break up their business operations, suggesting reform would result in the loss of research and development, impractical market fragmentation and higher service costs to consumers.
A survey commissioned by a tech industry trade group funded by Big Tech companies such as Apple, Facebook and Amazon suggests that Americans view tech regulation as a low priority for Congress. Among those listed as top priority for Americans were the economy, public health, climate change and infrastructure. The survey also revealed that Americans are more likely to oppose regulation if it were to affect offerings like free shipping on Amazon Prime products.
Perhaps this poll and the bipartisan sentiment among elected leaders signals that after COVID-19, society has become aware of its dependency on tech giants, for better or worse. For the last 18 months, American workers have adapted to remote work. They utilize programs run by Big Tech companies to communicate with other employees, to run companies, and to buy groceries and essentials. It is unlikely this dynamic will change, as many companies have announced their transition to a fully remote or hybrid work model.
This topic has raised interest among professionals, more specifically those who work in the tech industry, startups and small businesses. We at Fishbowl thought we’d ask professionals — many of whom work in the tech industry — about breaking up tech giants. Fishbowl is a social network for professionals, so conducting surveys on this and other workplace topics is a natural fit.
The survey ran from July 26-30, 2021, to determine how employees in the field feel about antitrust laws. The survey asked professionals: Do you believe antitrust legislation should be used to break up Big Tech companies like Amazon and Google?
There were 11,579 verified professionals on the Fishbowl app who participated in the survey, and they were given the option to answer either yes or no. The survey was broken down into state and professional industries such as law, consulting, finance, tech, marketing, accounting, human resources, teachers and others.
Here’s what the survey revealed:
Out of 11,579 professionals, the majority — 6,920 (59.76%) — responded yes to the survey question.
Based on responses, we found that law professionals were the highest group responding in the affirmative to the survey, with 66.67%. Consulting professionals followed with 61.97%, while finance (60.64%) marginally beat out tech (60.03%). Conversely, teachers had the lowest percentage with 53.49%. Human resources (55.65%), accounting (58.51%) and other professional industries (58.83%) trailed behind.
The survey’s data was collected from professionals in 25 U.S. states. The highest percentage responding “yes” was Colorado with 76.83%. In second place was Washington with 73.17%, and Michigan rounded out the top three with 69.70%. Missouri (51.35%) had the lowest percentage of employees responding “yes” to splitting up Big Tech. Following closely behind were Indiana (52.59%) and Massachusetts (52.83%). Overall, the majority of the states involved in the survey agreed that they believed antitrust legislation should indeed break up Big Tech companies.
Tech had the fourth-highest percentage of professionals agreeing that Big Tech companies should be broken up. Some benefits from breaking up Big Tech companies are more opportunities for small businesses — for a tech professional or entrepreneur, this could open up opportunities to launch new products, programs and services. It could also add more jobs for highly skilled professionals. Second, it can reduce data privacy and national security concerns. But some cons of breaking up Big Tech companies include the loss of research and development — large companies provide major funding for artificial intelligence, autonomous vehicles, wearables, robots and more. Ultimately, breaking up Big Tech companies can also increase service costs for professionals and the overall public.
As policymakers continue to negotiate on how to break up Big Tech, the White House is also making moves. President Joe Biden recently named Khan, a professor at Columbia Law School, as chair of the FTC. A staunch critic of Big Tech, Khan’s main priority is to protect the public from corporate abuse and ensure merger guidelines reflect economic realities and empirical learning and enforcement. Simply put, she reviews mergers with skepticism.
And in July, Biden announced his intention to nominate Jonathan Kanter for chief of the Justice Department’s Antitrust Division. Kanter is an antitrust lawyer with over 20 years of experience who has been a leading advocate and expert in the effort to promote strong and meaningful antitrust enforcement and competition policy.
With these additional members, it is expected that there will be an aggressive approach to enforcing antitrust laws across industries, leaving it to Congress to ensure that moving forward things are different.
from Amazon – TechCrunch https://ift.tt/3gJNCCD
via IFTTT
Exploring the CSS Paint API: Blob Animation
After the fragmentation effect, I am going to tackle another interesting animation: the blob! We all agree that such effect is hard to achieve with CSS, so we generally reach for SVG to make those gooey shapes. But now that the powerful Paint API is available, using CSS is not only possible, but maybe even a preferable approach once browser support comes around.
Here’s what we’re making. It’s just Chrome and Edge support for now, so check this out on one of those browsers as we go along.
Building the blob
Let’s understand the logic behind drawing a blob using a classic <canvas>
element to better illustrate the shape:
When talking about a blob, we’re also talking about the general shape of a distorted circle, so that’s the shape we can use as our base. We define N
points that we place around a circle (illustrated in green).
const CenterX = 200;
const CenterY = 200;
const Radius = 150;
const N = 10;
var point = [];
for (var i = 0; i < N; i++) {
var x = Math.cos((i / N) * (2 * Math.PI)) * Radius + CenterX;
var y = Math.sin((i / N) * (2 * Math.PI)) * Radius + CenterY;
point[i] = [x, y];
}
Considering the center point (defined by CenterX
/CenterY
) and the radius, we calculate the coordinate of each point using some basic trigonometry.
After that, we draw a cubic Bézier curve between our points using quadraticCurveTo()
. To do this, we introduce more points (illustrated in red) because a cubic Bézier curve requires a start point, a control point, and an end point.
The red points are the start and end points, and the green points can be the control points. Each red point is placed at the midpoint between two green points.
ctx.beginPath(); /* start the path */
var xc1 = (point[0][0] + point[N - 1][0]) / 2;
var yc1 = (point[0][1] + point[N - 1][1]) / 2;
ctx.moveTo(xc1, yc1);
for (var i = 0; i < N - 1; i++) {
var xc = (point[i][0] + point[i + 1][0]) / 2;
var yc = (point[i][1] + point[i + 1][1]) / 2;
ctx.quadraticCurveTo(point[i][0], point[i][1], xc, yc);
}
ctx.quadraticCurveTo(point[N - 1][0], point[N - 1][1], xc1, yc1);
ctx.closePath(); /* end the path */
Now all we have to do is to update the position of our control points to create the blog shape. Let’s try with one point by adding the following:
point[3][0]= Math.cos((3 / N) * (2 * Math.PI)) * (Radius - 50) + CenterX;
point[3][1]= Math.sin((3 / N) * (2 * Math.PI)) * (Radius - 50) + CenterY;
The third point is closest to the center of our circle (by about 50px) and our cubic Bézier curve follows the movement perfectly to keep a curved shape.
Let’s do the same with all the points. We can use the same general idea, changing these existing lines:
var x = Math.cos((i / N) * (2 * Math.PI)) * Radius + CenterX;
var y = Math.sin((i / N) * (2 * Math.PI)) * Radius + CenterY;
…into:
var r = 50*Math.random();
var x = Math.cos((i / N) * (2 * Math.PI)) * (Radius - r) + CenterX;
var y = Math.sin((i / N) * (2 * Math.PI)) * (Radius - r) + CenterY;
Each point is offset by a random value between 0 and 50 pixels, bringing each point closer to the center by a slightly different amount. And we get our blob shape as a result!
Now we apply that shape as a mask on an image using the CSS Paint API. Since we are dealing with a blobby shape, it’s suitable to consider square elements (height equal to width) instead, where the radius is equal to half the width or height.
Here we go using a CSS variable (N
) to control the number of points.
I highly recommend reading the first part of my previous article to understand the structure of the Paint API.
Each time the code runs, we get a new shape, thanks to the random configuration.
Let’s animate this!
Drawing a blog is good and all, but animating it is better! Animating the blob is actually the main purpose of this article, after all. We will see how to create different kinds of gooey blob animations using the same foundation of code.
The main idea is to smoothly adjust the position of the points — whether it’s all or some of them — to transition between two shapes. Let’s start with the basic one: a transition from a circle into a blob by changing the position of one point.
For this, I introduced a new CSS variable, B , to which I am applying a CSS transition.
@property --b{
syntax: '<number>';
inherits: false;
initial-value: 0;
}
img {
--b:0;
transition:--b .5s;
}
img:hover {
--b:100
}
I get the value of this variable inside the paint()
function and use it to define the position of our point.
If you check the code in the embedded linked demo, you will notice this:
if(i==0)
var r = RADIUS - B;
else
var r = RADIUS
All the points have a fixed position (defined by the shape’s radius) but the first point specifically has a variable position, (RADIUS
- B
). On hover, The value of B
is changing from 0 to 100, moving our point closer to the middle while creating that cool effect.
Let’s do this for more points. Not all of them but only the even ones. I will define the position as follow:
var r = RADIUS - B*(i%2);
We have our first blob animation! We defined 20 points and are making half of them closer to the center on hover.
We can easily have different blobby variations simply by adjusting the CSS variables. We define the number of points and the final value of the B
variable.
Now let’s try it with some random stuff. Instead of moving our points with a fixed value, let’s make that value random move them all around. We previously used this:
var r = RADIUS - B*(i%2);
Let’s change that to this:
var r = RADIUS - B*random();
…where random()
gives us a value in the range [0 1]
. In other words, each point is moved by a random value between 0 and B
. Here’s what we get:
See that? We get another cool animation with the same code structure. We only changed one instruction. We can make that instruction a variable so we can decide if we want to use the uniform or the random configuration without changing our JavaScript. We introduce another variable, T
, that behaves like a boolean:
if(T == 0)
var r = RADIUS - B*(i%2);
else
var r = RADIUS - B*random();
We have two animations and, thanks to the T
variable, we get to decide which one to use. We can control the number of points using N
and the distance using the variable V
. Yes, a lot of variables but don’t worry, we will sum up everything at the end.
What is that random()
function doing?
It’s the same function I used in the previous article. We saw there that we cannot rely on the default built-in function because we need a random function where we are able to control the seed to make sure we always get the same sequence of random values. So the seed value is also another variable that we can control to get a different blob shape. Go change that value manually and see the result.
In the previous article, I mentioned that the Paint API removes all of the complexity on the CSS side of things, and that gives us more flexibility to create complex animations. For example, we can combine what we have done up to this point with keyframes and cubic-bezier()
:
The demo includes another example using the parabolic curve I detailed in a previous article.
Controlling the movement of the points
In all the blobs we’ve created so far, we considered the same movement for our points. Whether we’re using the uniform configuration or the random one, we always move the points from the edge to the center of the circle following a line.
Now let’s see how we can control that movement in order to get even more animations. The idea behind this logic is simple: we move the x
and y
differently.
Previously we were doing this:
var x = Math.cos((i / N) * (2 * Math.PI)) * (Radius - F(B)) + CenterX;
var y = Math.sin((i / N) * (2 * Math.PI)) * (Radius - F(B)) + CenterY;
…where F(B)
is a function based on the variable B
that holds the transition.
Now we will have something like this instead:
var x = Math.cos((i / N) * (2 * Math.PI)) * (Radius - Fx(B)) + CenterX;
var y = Math.sin((i / N) * (2 * Math.PI)) * (Radius - Fy(B)) + CenterY;
…where we’ve updating the x
and y
variables differently to makes more animations. Let’s try a few.
One axis movement
For this one, we will make one of the functions equal to 0 and keep the other one the same as before. In other words, one coordinate remains fixed along the animation
If we do:
Fy(B) = 0
…we get:
The points are only moving horizontally to get another kind of effect. We can easily do the same for the other axis by making Fx(B)=0
(see a demo).
I think you get the idea. All we have to do is to adjust the functions for each axis to get a different animation.
Left or right movement
Let’s try another kind of movement. Instead of making the points converging into the center, let’s make them move into the same direction (either right or left). We need a condition based on the location of the point which is defined by the angle.
We have two group of points: ones in the [90deg 270deg]
range (the left side), and the remaining points along the ride side of the shape. If we consider the indexes, we can express the range differently, like [0.25N
0.75N]
where N
is the number of points.
The trick is to have a different sign for each group:
var sign = 1;
if(i<0.75*N && i>0.25*N)
sign = -1; /* we invert the sign for the left group */
if(T == 0)
var r = RADIUS - B*sign*(i%2);
else
var r = RADIUS - B*sign*random();
var x = Math.cos((i / N) * (2 * Math.PI)) * r + cx;
And we get:
We are able to get the same direction but with one small drawback: one group of the points are going outside the mask area because we are increasing the distance on some points while decreasing the distance on others. We need to reduce the size of our circle to leave enough space for all of our points.
We simply decrease the size of our circle using the V
value that defines the final value for our B
variable. In other words, it’s the maximum distance that one point can reach.
Our initial shape (illustrated by the grey area and defined with the green points) will cover a smaller area since we will decrease the Radius value with the value of V
:
const V = parseFloat(properties.get('--v'));
const RADIUS = size.width/2 - V;
We fixed the issue of the points getting outside but we have another small drawback: the hover-able area is the same, so the effect starts even before the cursor hits the image. It would be good if we can also reduce that area so everything is consistent.
We can use an extra wrapper and a negative margin trick. Here’s the demo. The trick is pretty simple:
.box {
display: inline-block;
border-radius: 50%;
cursor: pointer;
margin: calc(var(--v) * 1px);
--t: 0;
}
img {
display: block;
margin: calc(var(--v) * -1px);
pointer-events: none;
-webkit-mask: paint(blob);
--b: 0;
transition:--b .5s;
}
.box:hover img {
--b: var(--v)
}
The extra wrapper is an inline-block
element. The image inside it has negative margins equal to the V
variable which reduces the overall size of the shape’s box. Then we disable the hover effect on the image element (using pointer-events:
none
) so only the box element triggers the transition. Finally we add some margin to the box element to avoid any overlap.
Like the previous effect, this one can also be combined with cubic-bezier()
and keyframes to get more cool animations. Below is an example using my sinusoidal curve for a wobbling effect on hover.
If we add some transforms, we can create a kind of strange (but pretty cool) sliding animation:
Circular movement
Let’s tackle another interesting movement that will allow us to create infinite and “realistic” blob animations. Instead of moving our points from one location to another, we will rotate them around an orbit to have a continuous movement.
The initial location of our points (in green) will become an orbit and the red circle is the path that our points will take. In other words, each point will rotate around its initial position following a circle having a radius r.
All we need to do is make sure there is no overlap between two adjacent paths so the radius need to have a maximum allowed value.
I will not detail the math but the max value is equal to:
const r = 2*Radius*Math.sin(Math.PI/(2*N));
This is the relevant part of the code:
var r = (size.width)*Math.sin(Math.PI/(N*2));
const RADIUS = size.width/2 - r;
// ...
for(var i = 0; i < N; i++) {
var rr = r*random();
var xx = rr*Math.cos(B * (2 * Math.PI));
var yy = rr*Math.sin(B * (2 * Math.PI));
var x = Math.cos((i / N) * (2 * Math.PI)) * RADIUS + xx + cx;
var y = Math.sin((i / N) * (2 * Math.PI)) * RADIUS + yy + cy;
point[i] = [x,y];
}
We get the max value of the radius and we reduce that value from the main radius. Remember that we need to have enough space for our points so we need to reduce the mask area like we did with the previous animation. Then for each point we get a random radius rr
(between 0 and r
). Then we calculate the position inside the circular path using xx
and yy
. And, finally, we place the path around its orbit and get the final position (the x
, y
values).
Notice the value B
which is, as usual, the one with the transition. This time, we will have a transition from 0 to 1 in order to make a full turn around the orbit.
Spiral movement
One more for you! This one is a combination of the two previous ones.
We saw how to move the points around a fixed orbit and how to move a point from the edge of the circle to the center. We can combine both and have our point move around an orbit and we do the same for the orbit by moving it from the edge to the center.
Let’s add an extra variable to our existing code:
for(var i = 0; i < N; i++) {
var rr = r*random();
var xx = rr*Math.cos(B * (2 * Math.PI));
var yy = rr*Math.sin(B * (2 * Math.PI));
var ro = RADIUS - Bo*random();
var x = Math.cos((i / N) * (2 * Math.PI)) * ro + xx + cx;
var y = Math.sin((i / N) * (2 * Math.PI)) * ro + yy + cy;
point[i] = [x,y];
}
As you can see, I used the exact same logic as the very first animation we looked at. We reduce the radius with a random value (controlled with Bo
in this case).
Yet another fancy blob animation! Now each element has two animations: one animates the orbit (Bo
), and the other animates the point in its circular path (B
). Imagine all the effects that you can get by simply adjusting the animation value (duration, ease, etc.)!
Putting everything together
Oof, we are done with all the animations! I know that some of you may have gotten lost with all the variations and all the variables we introduced, but no worries! We will sum everything up right now and you will see that it’s easier than what might expect.
I want to also highlight that what I have done is not an exhaustive list of all the possible animations. I only tackled a few of them. We can define even more but the main purpose of this article is to understand the overall structure and be able to extend it as needed.
Let’s summarize what we have done and what are the main points:
- The number of points (
N
): This variable is the one that controls the granularity of the blob’s shape. We define it in the CSS and it is later used to define the number of control points. - The type of movement (
T
): In almost all the animations we looked at, I always considered two kind of animations: a “uniform” animation and a “random” one. I am calling this the type of movement that we can control using the variableT
set in the CSS. We will have somewhere in the code to do an if-else based on thatT
variable. - The random configuration: When dealing with random movement, we need to use our own
random()
function where we can control the seed in order to have the same random sequence for each element. The seed can also be considered a variable, one that generates different shapes. - The nature of movement: This is the path that the points take. We can have a lot of variations, for example:
- From the edge of the circle to the center
- A one axis movement (the x or y axis)
- A circular movement
- A spiral movement
- and many others…
Like the type of movement, the nature of the movement can also be made conditional by introducing another variable, and there is no limit to what can be done here. All we have to do is to find the math formula to create another animation.
- The animation variable (
B
): This is the CSS variable that contains the transition/animation. We generally apply a transition/animation from 0 to a certain value (defined in all the examples with the variableV
). This variable is used to express the position of our points. Updating that variable logically updates the positions; hence the animations we get. In most cases, we only need to animate one variable, but we can have more based on the nature of the movement (like the spiral one where we used two variables). - The shape area: By default, our shape covers the entire element area, but we saw that some movement require the points to go outside the shape. That’s why we had to reduce the area. We generally do this by the maximum value of
B
(defined byV
), or a different value based on the nature of the movement.
Our code is structured like this:
var point = [];
/* The center of the element */
const cx = size.width/2;
const cy = size.height/2;
/* We read all of the CSS variables */
const N = parseInt(properties.get('--n')); /* number of points */
const T = parseInt(properties.get('--t')); /* type of movement */
const Na = parseInt(properties.get('--na')); /* nature of movement */
const B = parseFloat(properties.get('--b')); /* animation variable */
const V = parseInt(properties.get('--v')); /* max value of B */
const seed = parseInt(properties.get('--seed')); /* the seed */
// ...
/* The radius of the shape */
const RADIUS = size.width/2 - A(V,T,Na);
/* Our random() function */
let random = function() {
// ...
}
/* we define the position of our points */
for(var i = 0; i < N; i++) {
var x = Fx[N,T,Na](B) + cx;
var y = Fy[N,T,Na](B) + cy;
point[i] = [x,y];
}
/* We draw the shape, this part is always the same */
ctx.beginPath();
// ...
ctx.closePath();
/* We fill it with a solid color */
ctx.fillStyle = '#000';
ctx.fill();
As you can see, the code is not as complex as you might have expected. All the work is within those function Fx
and Fy
, which defines the movement based on N,T
and Na
. We also have the function A
that reduces the size of the shape to prevent points overflowing the shape during the animation.
Let’s check the CSS:
@property --b {
syntax: '<number>';
inherits: false;
initial-value: 0;
}
img {
-webkit-mask:paint(blob);
--n: 20;
--t: 0;
--na: 1;
--v: 50;
--seed: 125;
--b: 0;
transition: --b .5s;
}
img:hover {
--b: var(--v);
}
I think the code is self-explanatory. You define the variables, apply the mask, and animate the B
variable using either a transition or keyframes. That’s all!
I will end this article with a final demo where I put all the variations together. All you have to do is to play with the CSS variables
Exploring the CSS Paint API series:
- Image Fragmentation
- Blob Animation (this article)
The post Exploring the CSS Paint API: Blob Animation appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
from CSS-Tricks https://ift.tt/3sWZwhl
via IFTTT
Sunday, August 29, 2021
Isolated Thunderstorms today!
With a high of F and a low of 60F. Currently, it's 65F and Partly Cloudy outside.
Current wind speeds: 7 from the Southeast
Pollen: 6
Sunrise: August 29, 2021 at 06:17PM
Sunset: August 30, 2021 at 07:26AM
UV index: 0
Humidity: 79%
via https://ift.tt/2livfew
August 30, 2021 at 10:04AM
Saturday, August 28, 2021
Mostly Clear today!
With a high of F and a low of 56F. Currently, it's 73F and Clear outside.
Current wind speeds: 11 from the Northeast
Pollen: 6
Sunrise: August 28, 2021 at 06:16PM
Sunset: August 29, 2021 at 07:28AM
UV index: 0
Humidity: 47%
via https://ift.tt/2livfew
August 29, 2021 at 10:04AM
How Amazon EC2 grew from a notion into a foundational element of cloud computing
Fifteen years ago this week on August 25, 2006, AWS turned on the very first beta instance of EC2, its cloud-based virtual computers. Today cloud computing, and more specifically infrastructure as a service, is a staple of how businesses use computing, but at that moment it wasn’t a well known or widely understood concept.
The EC in EC2 stands for Elastic Compute, and that name was chosen deliberately. The idea was to provide as much compute power as you needed to do a job, then shut it down when you no longer needed it — making it flexible like an elastic band. The launch of EC2 in beta was preceded by the beta release of S3 storage six months earlier, and both services marked the starting point in AWS’ cloud infrastructure journey.
You really can’t overstate what Amazon was able to accomplish with these moves. It was able to anticipate an entirely different way of computing and create a market and a substantial side business in the process. It took vision to recognize what was coming and the courage to forge ahead and invest the resources necessary to make it happen, something that every business could learn from.
The AWS origin story is complex, but it was about bringing the IT power of the Amazon business to others. Amazon at the time was not the business it is today, but it was still rather substantial and still had to deal with massive fluctuations in traffic such as Black Friday when its website would be flooded with traffic for a short but sustained period of time. While the goal of an e-commerce site, and indeed every business, is attracting as many customers as possible, keeping the site up under such stress takes some doing and Amazon was learning how to do that well.
Those lessons and a desire to bring the company’s internal development processes under control would eventually lead to what we know today as Amazon Web Services, and that side business would help fuel a whole generation of startups. We spoke to Dave Brown, who is VP of EC2 today, and who helped build the first versions of the tech, to find out how this technological shift went down.
Sometimes you get a great notion
The genesis of the idea behind AWS started in the 2000 timeframe when the company began looking at creating a set of services to simplify how they produced software internally. Eventually, they developed a set of foundational services — compute, storage and database — that every developer could tap into.
But the idea of selling that set of services really began to take shape at an executive offsite at Jeff Bezos’ house in 2003. A 2016 TechCrunch article on the origins AWS described how that started to come together:
As the team worked, Jassy recalled, they realized they had also become quite good at running infrastructure services like compute, storage and database (due to those previously articulated internal requirements). What’s more, they had become highly skilled at running reliable, scalable, cost-effective data centers out of need. As a low-margin business like Amazon, they had to be as lean and efficient as possible.
They realized that those skills and abilities could translate into a side business that would eventually become AWS. It would take a while to put these initial ideas into action, but by December 2004, they had opened an engineering office in South Africa to begin building what would become EC2. As Brown explains it, the company was looking to expand outside of Seattle at the time, and Chris Pinkham, who was director in those days, hailed from South Africa and wanted to return home.
from Amazon – TechCrunch https://ift.tt/3gGPqw2
via IFTTT
Friday, August 27, 2021
Mostly Clear today!
With a high of F and a low of 63F. Currently, it's 76F and Clear outside.
Current wind speeds: 16 from the Southeast
Pollen: 6
Sunrise: August 27, 2021 at 06:15PM
Sunset: August 28, 2021 at 07:29AM
UV index: 0
Humidity: 40%
via https://ift.tt/2livfew
August 28, 2021 at 10:03AM
My tiny side project has had more impact than my decade in the software industry
That’s a heartwrenching title from Michael Williamson. I believe it though. It’s kinda like a maximized version of the blogging phenomenon where if you work on a post for weeks it’ll flop compared to a post that’s some dumb 20-minute thought. Or how your off-handed remark to some developer at the perfect time might cause some huge pivot in what they are doing, changing the course of a project forever. For Mike, it was a 3,000 line-of-code side project that had more impact on the world than a career of work as a software developer.
I’ve tried to pick companies working on domains that seem useful: developer productivity, treating diseases, education. While my success in those jobs has been variable – in some cases, I’m proud of what I accomplished, in others I’m pretty sure my net effect was, at best, zero – I’d have a tough time saying that the cumulative impact was greater than my little side project.
Impact is fuzzy though, isn’t it? I don’t know Mike, but assuming he is a kind and helpful person, think of all the people he’s likely helped along the way. Not by just saving them minutes of toil, but helped. Helped grow, helped through hard times, helped guide to where they ought to go. Those things are immeasurable and awfully important.
Direct Link to Article — Permalink
The post My tiny side project has had more impact than my decade in the software industry appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
from CSS-Tricks https://ift.tt/3ljR5uw
via IFTTT
Mostly Clear today!
With a high of F and a low of 15F. Currently, it's 14F and Clear outside. Current wind speeds: 13 from the Southwest Pollen: 0 S...
-
So you want an auto-playing looping video without sound? In popular vernacular this is the very meaning of the word GIF . The word has stuck...
-
With a high of F and a low of 31F. Currently, it's 37F and Cloudy outside. Current wind speeds: 7 from the Northeast Pollen: 0 S...
-
Last year , we kicked out a roundup of published surveys, research, and other findings from around the web. There were some nice nuggets in ...