UK State of Open Report Finds 97% of UK Businesses Surveyed Use Open Source Software

OpenUK, a WordPress-powered not-for-profit company, has released its State of the Open report with data from the UK in 2021. The company advocates for open source software, open source hardware, and open data, while providing a central point of collaboration for people working in the open sectors.

The State of the Open report offers a broad overview of the UK’s open source ecosystem. This collection of research includes surveys of UK companies, interviews, industry reports, and analysis from different publications. It was sponsored by GitHub, SUSE, and the Open Invention Network, and conducted by Smoothmedia consulting firm under the direction of ethnographer and social researcher Dr. Jennifer Barth.

Key findings in Phase 1 of the report include research demonstrating that open source software contributes an estimated £43.1 billion to the UK economy, with the UK ringing in as Europe’s largest contributor.

Phase 2 covers open source adoption in the UK. Researchers found a staggering 97% of the 273 UK businesses surveyed use some form of open source software:

We found that 97% of businesses of different sizes in all sectors of the UK economy use open source software technology. Although resources became a more pressing concern during the pandemic, 64% of businesses in our sample experienced business growth which translated into a high recruitment drive for roles relating to open source software in the past 12 months (see recruitment findings). Further, we find that almost half of businesses surveyed (48%) are using open source software more as digital adoption becomes embedded in organisational culture and business.

Other key findings from Phase 2 include the following:

  • 53% of non-tech organizations contribute to open source software projects
  • 77% of UK public sector looks to open source for skills developmen
  • Over half (54%) have written policies and processes for open source contributions
  • 89% run open source software internally in their business
  • Approximately two thirds (65%) contribute to open source software projects

One interesting observation from the contribution data is that smaller companies are more likely to contribute back to open source than larger companies. Smaller companies are also more likely to use open source software in their businesses.

Survey respondents cited “saving on costs” as the main reason for adopting open source (75%), followed by more collaboration (72%), skill development (64%), the quality of code (61%), and security (52%).

Phase 3 is planned to be published in September 2021. This report will focus on UK data with a methodology tailored to reveal the value of open source software to the digital economy. It will also include case studies that demonstrate the non-economic, intangible benefits of open source software, such as skills development and collaboration.

The published reports are lengthy but will be of particular interest to companies working in the UK and Europe, especially consultancies that may need to justify using open source technologies in engineering decisions. OpenUK plans to conduct a further survey in 2022 as part of this effort to estimate the impact of open source on the UK economy.

Contributing to Open Source Is ‘Better Than Any College Degree’

A week ago, I published my thoughts on the block system from a developer’s perspective. Taking a weekend-afternoon deep dive into creating custom block types meant learning some tough lessons and familiarizing myself with a programming language I had little experience using.

Programming has always been a trial-and-error affair for me: write code, refresh the browser, read the error message, and attempt to fix the problem. Then, simply rinse and repeat the process until the program is not broken. Those mistakes are woven into the art of coding, the layers underneath that poetry on the visible canvas.

I have absolutely made the same mistake twice. And, thrice. Probably a lot more than that if I am being honest with myself and you. Eventually, I stop making those same mistakes, and some method or procedure is permanently seared into my brain.

I have written a few hundred WordPress tutorials in the past decade and a half. I am a twice-published author of development books and served as a tech editor on another. However, I am not much of a reader of tech books and documentation. For one, programmers are not necessarily the most engaging writers. Plus, book smarts can only get you so far. You need the street smarts of programming to become good at it, which means learning from experience.

While I firmly believe that reading is a central part of that, there is no replacement for getting your hands dirty. Building things, making mistakes, and learning to fix them is what makes programming fun.

Working on open-source software like WordPress is one of the best ways to do that. There is no upfront cost, assuming you have access to a computer, a prerequisite to programming of any kind. There are usually people willing to lend a hand or answer questions, and there are always problems to solve for those ready to dive into them.

As WordPress Executive Director Josepha Haden Chomphosy chatted with Matt Mullenweg on the Openverse project a couple of months ago, there was a moment that I found myself nodding my head in agreement.

Because, of course, you know, contributing and being involved with open source is probably the best way to learn a technology, better than any college degree.

Matt Mullenweg, WordPress Project Lead

I have learned more about WordPress, PHP, HTML, CSS, and JavaScript by contributing to open-source software than I ever learned in a college course.

I grew up in a generation that was told that we must get a college degree. It was an integral part of the American dream that would result in suburban life in a neighborhood with perfectly aligned rows of houses, ending in a cul-de-sac. It was the first step toward a two-car garage, white-picket-fence, 2.5 kids, and a dog. College was the promise that my peers and I hinged everything on. It was expected of us, and so many of us did our duty.

Here is the thing that our parents did not know. The internet would change everything.

I graduated high school in 2002. This was during that stretch where the online world was exploding. All of the world’s knowledge would soon be at our fingertips. Today that is truer than ever. Anything you will ever need to learn about writing code is available through an internet connection.

My experience with college-level courses in programming was mixed, but I learned a necessary life lesson from them: I was not cut out for a degree in software engineering. I am glad I wised up early on and pursued a different degree, saving myself some time and money.

I rocked my half-summer C programming class, my introduction to writing code. I also had a passionate professor who once worked on U.S. missile projects as a bug-tester. It was probably not the most glamorous job, but he always made it sound exciting because he loved what he was doing. Our class was tasked with building various programs throughout the course, but we usually had a choice in what we were building. For my group’s final project, we created vending machine software.

I was on the fast track to becoming a software engineer after that first class. I had built a way for merchants to get paid for delivering sugary treats and soft drinks to customers. It was capitalism meeting programming, and I had a taste for it.

The fall semester rolled around, and I was motivated to move beyond the realm of procedural programming in C. Java, an object-oriented programming (OOP) language, would be my next challenge.

The most advanced thing our class built for an entire semester was a basic calculator. I skipped nearly every lecture because I could not stay awake watching the professor chicken-peck his way through programs for three hours every week. I attended the mandatory “labs” — basically a fancy way of saying an extra class where the professor’s assistants would teach the actual coursework.

Needless to say, my fire died down. While calculator programs are handy tools, I wanted to branch out and build things that mattered.

You know what reignited my flame for programming? At first, it was general web development. But, WordPress was what I really became passionate about. And, I have not looked back since I started using it in 2005.

WordPress was my gateway into a world where I could create things that interested me. I could jump ahead into a project far more advanced than my skill level, trial-and-error my way ahead, and eventually build something that others found value in.

Unless universities have changed, most teach step-by-step foundational lessons to their pupils. Some students may luck out and land in that unique professor’s class who gives them leeway to explore various ideas. However, there is no substitute for creating something of your own, solving a problem that you see.

And, that is what programming is all about — solving problems.

In 2007, I released my first WordPress plugin into the wild. It automatically listed all of the subpages of the currently-viewed page. Dozens of similar plugins have been written since and probably before (it seems WordPress would have a simple “list subpages” function by now).

Last week, after writing a new plugin, I was reminded of the free education that the WordPress community has given me over the years. Some of it has been reading documentation. Some from WordPress Stack Exchange answers. Other bits have been studying from those who came before me, building upon their open-source code. All of it was from other people giving something back to our community.

This is not necessarily a knock on college. Some people perform better in that structured environment, and there is value in all forms of education. However, there are alternatives for those who cannot afford college or learn better in a different environment. And, there is no discounting the experience you get from contributing to something bigger.

If you are one of our readers thinking about getting into programming, just dive in. Make some mistakes. Build. Learn.

Best Social CRM

Social CRM software makes the process of managing customer relationships across all your social media channels easier while bringing you closer to your customers. You can think of it as blending all the benefits of a customer relationship management tool with your Instagram, Facebook, Twitter, and/or LinkedIn.

Thankfully, there are social CRM tools that can help you elevate your brand and keep a finger on all your customer interactions. We go through each of the best ones below.

The Top 5 Best Social CRMs

  1. Sprout Social – Best all-in-one social CRM
  2. Falcon.io – Best for single users
  3. Salesforce Social Studio – Best for large social media teams
  4. Agile CRM – Best free CRM
  5. HubSpot – Best for managing a lot of social accounts

Let’s dive a bit deeper into each tool to paint a clearer picture of how each tool functions and whether it’s a good fit for your social media operations.

#1 – Sprout Social — Best All-In-One Social CRM

  • Centralized editorial calendar
  • Social listening features
  • Track mentions in real time
  • Slack & Dropbox integrations
Try free for 30 days

Social media is at the core of Sprout Social’s all-in-one toolbox— perfect for both startups and businesses with up to 100 employees. It uses social listening features that give you valuable insight into the themes, messages, demographics, and conversations of your customers so you can always stay a step ahead of the curve.

Once you create an account, you’ll find a suite of tools that make social media posting and scheduling easy with a weekly or monthly calendar that gives you a bird’s eye view of your posting frequency by date. You can plan and prewrite posts across all your channels once you’ve set up a customized posting blueprint.

Customer management features include sentiment research and the ability to track conversations that mention your brand and how your customers feel about it.

The social media manager lets you take advantage of automation tools you can personalize, including the ability to interact with customers using rule-based logic through Twitter or Facebook.

Sprout Social integrates with some of the tools you’re likely already using, including Microsoft 365, Dropbox, Salesforce, and Slack.

Here’s a look at Sprout Social’s three pricing plans.

  • Standard – $99/user per month
  • Professional – $149/user per month
  • Advanced – $249/user per month

If you’re still on the fence about Sprout Social, you can try its 30-day free trial or request a demo first to get a firsthand feel for the tool.

Get started with Sprout Social here. 

#2 – Falcon.io — Best for Single Users

  • Manage from one social dashboard
  • Collaborative, dynamic content calendar
  • Social listening
  • Data analytics
Try free for 14 days

Falcon.io offers you a collaborative social calendar where single users can create social campaigns, measure impact, and keep track of their customer interaction history. The social media manager adds clarity to your social media game plan by centralizing all your social media needs on a dashboard where you can easily visualize workflows.

Its Publish Content Calendar lets you organize boards where you can plan your posts and captions then easily publish them across all your connected channels. One social inbox allows you to seamlessly keep track of customer interactions informed by personalized customer profile cards.

Falcon.io doesn’t leave you aiming in the dark either, it comes equipped with plenty of data and analytics including social listening features. To top it all off, if you get stuck on anything Falcon.io offers live chat along with advisory services to make sure you’re getting the most out of its platform. However, this doesn’t come without a price.

  • Essentials – $108/seat per month
  • Suite – Request a demo

Take advantage of its 14-day free trial and demo options to get firsthand experience with Falcon.io out here. 

#3 – Salesforce Social Studio — Best for Large Social Media Teams

  • Deep collaborative features
  • Powerful real-time command center
  • Boost social media marketing via Salesforce
  • Scalable through 4 plans
Request your demo

You might’ve already heard of Salesforce as a huge name in the marketing industry— and for good reason. It covers just about every aspect of online marketing, and it also helps you take good care of your social media presence with Salesforce Social Studio.

Social Studio is built so that you get access to insight from virtually any social source so you can learn from real customer discussions. It includes sentiment analysis tools that keep you in the know of changing trends, attitudes, and customer behaviors.

The platform’s team collaboration features include the ability to collaborate on campaigns by sharing drafts, schedules, and photos for reviews and approvals.

One of Social Studio’s more interesting features is its ability to collect and classify data in real-time on its command center, which is highly customizable and makes it easy for teams to get an overview of customer profiles based on region or post popularity. Launching a campaign and eager to know how it’s doing? You can watch your results unfold in real time right on the visual dashboard.

  • Basic – $1000/organization per month
  • Pro – $4000/organization per month
  • Corporate – $12,000/organization per month
  • Enterprise – $40,000/organization per month

While the pricing may seem high, the Basic plan is focused on social listening and analysis, and the Pro level adds in publishing and engagement across platforms. With Corporate, you get tons of features to support multiple brands or products, and Enterprise helps maximize results at scale through multiple teams, brands, and even locations.

You can contact Social Studio for a demo and to get additional pricing details.

Get started with Salesforce Social Studio here. 

#4 – Agile CRM — Best Free CRM

  • Automate social announcements
  • Track keyword mentions
  • Multiple users can respond to interactions at once
  • Up to 10 users free
Try it for free

If you’re in need of a free social CRM tool, Agile CRM will be right up your alley. It comes with plenty of useful features to help you get a handle on your social presence and customer relationships.

The social media manager lets you track company mentions in comments through its keyword functionality. It automatically posts company announcements on your social platform of choice from a centralized dashboard.

Team collaboration features include the ability to include up to 10 users at a time through its free tier. Once logged in, your team members are able to send direct messages to customers, answer questions, and create marketing automations targeted at specific audiences.

However, the platform also lets you schedule posts that are published automatically, even if you happen to not be online. Agile CRM’s social tools are only a part of a wider range of CRM tools Agile offers. If you decide to use its free social media manager, you can be sure you’ll have scaling options once your business needs grow.

  • Free – for 10 users
  • Starter – $8.99/user per month
  • Regular – $29.99/user per month
  • Enterprise – $47.99/user per month

Start using Agile CRM for free here. 

#5 – HubSpot — Best for Managing a Lot of Social Accounts

  • Custom keyword monitoring
  • Accommodates 300 social accounts
  • Respond to interactions directly from your dashboard
  • Reporting on all channels
Learn more

Though HubSpot offers a free CRM tier, it’s not until you start using its paid Professional plan that you get to see the breadth of what you can really do with it.

HubSpot is built as a feature-rich ecosystem full of tools to help just about any part of the marketing pipeline. Its social media features can help you attract and retain your target audience over up to 300 different social accounts.

With HubSpot, you’ll have one place from where you can share and distribute landing pages, blog posts, and social media updates, which eliminates the need to switch back and forth between tools. It automatically shares scheduled content, and once your customers interact with your content, out-of-the-box social media reports let you know what’s working on each platform and the overall ROI of your social efforts.

HubSpot also enables you to monitor conversations and brand mentions and track engagement. Want to reply to social comments? No need to switch between tabs. You can do it right on the HubSpot dashboard.

The social media manager lets you easily create custom keyword monitoring streams so your social team can stay informed on the specific mentions and topics they’re focusing on.

Here’s a look at HubSpot’s pricing:

  • Starter – $45/month billed yearly
  • Professional – $800/month billed yearly
  • Enterprise – $3,200/month billed yearly

Ready to get started with HubSpot? Get started here.

How to Find The Best Social CRM For You

The best CRM systems arm you with the basics, which include the ability to plan, post, and monitor all your social media posts while also keeping track of your customer interactions. But the basics won’t be enough to determine which is the best software for you. Let’s expand on a few features worth considering:

Team Collaboration Options

Are you working with a social media team that’s more than a one-man show? A shared social media inbox feature can ensure your team is staying on top of all incoming messages, whether those are customer complaints, questions and concerns, or favorable remarks.

Features like customer interaction history that’s accessible to all on your team can make sure you stay away from silly mistakes while streamlining the interaction process so you keep your customers happy.

When you’re considering a social CRM tool, make sure to look for collaborative features that’ll make the social media management process easier with features like sign-offs and permissions that’ll help your team post the right content with confidence.

Social Listening

Social listening is easily one of the more useful tools a social CRM can arm you with. Social listening takes brand management to a completely new level once you’re hyper-aware of your brand’s perception throughout all social media channels you’re being mentioned in.

As a small business or startup, the social listening features might not be your number one priority. But as your business grows and your reach increases, being in the know of what’s being said about your brand will equip you to manage and maintain a brand reputation. Some brands, like Falcon.io, can go as far as letting you set up alerts for unusual mentions and trends.

Customer Profiles

Does your social CRM come with the ability to create customer profiles? It goes without saying customer profiles help you organize your content around a better understanding of your customers with accurate data.

Once you get your hands on a social CRM that enables you to track customer data, you’ll be better equipped to handle customer concerns, support questions, and customer experiences.

Usually, more advanced social CRM tools will offer the option of keeping customer profiles. So if you want access to more advanced features, you’ll have to consider the investment you’re willing to make into a social CRM that can grow with the needs of your business.

Summary

What’s the best social CRM for you? It really boils down to what your social media goals are. Here’s a quick recap of each tool in this review and what they’re best for:

If social media is the beating heart of your marketing, go with Sprout Social. It’s a social CRM that can do it all at a reasonable price.

If you’re a solo social media maven and want a powerful solution, check out Falcon.io.

Leverage the power of Salesforce for your social media marketing by using Salesforce Social Studio and feel the difference.

On a tight budget? Agile CRM has the most generous free plan and it’s still full of useful social listening and messaging features.

If you’re juggling many different social media personae every day, go with one of the best Swiss Army knives in the business: HubSpot.

Hopefully, this guide gives you a broader understanding of what’s out there and which tools can come closer to meeting your needs. Once you have the right social CRM locked and loaded, there’s no telling what the ROI of your social media efforts can be.

Meet `:has`, A Native CSS Parent Selector

The reasons that are often cited that make container queries difficult or impossible is things like infinite loops—e.g. changing the width of an element, invalidating a container query, which changes the width again, which makes the container query take effect, etc. But that was solved with containment. A “parent selector”, or :has as it is now been officially dubbed (I like it, that’s how jQuery rolled, although Adrian pointed out a tweet noting that it’s more versatile), has traditionally had similar problems. Things like requiring “multiple pass” rendering which is too slow to be acceptable.

Brian Kardell says:

Primarily, even without :has() it’s pretty hard to live up to performance guarantees of CSS, where everything continue to evaluate and render “live” at 60fps. If you think, mathematically, about just how much work is conceptually involved in applying hundreds or thousands of rules as the DOM changes (including as it is parsing), it’s quite a feat as is.

Engines have figured out how to optimize this based on clever patterns and observations that avoid the work that is conceptually necessary – and a lot of that is sort of based on these subject invariants that has() would appear to throw to the wind.

The fact that there is a spec now is super encouraging, and that it has Igalia’s eye on it. Apparently, some of the performance problems have either been surmounted or, through testing, determined to be negligible enough to remain a shippable feature.

Adrian Bece digs into it all!

The team at Igalia has worked on some notable web engine features like CSS grid and container queries, so there is a chance for :has selector to see the light of day, but there is still a long way to go.

What makes relational selector one of the most requested features in the past few years and how are the developers working around the missing selector? In this article, we’re going to answer those questions and check out the early spec of :has selector and see how it should improve the styling workflow once it’s released.

Let’s cross our fingers. I’ve been watching this for 10 years and trying to document use cases.

Direct Link to ArticlePermalink


The post Meet `:has`, A Native CSS Parent Selector appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

Best Practices of Using JPA (Hibernate) With Kotlin

Kotlin is great: it’s more concise and expressive than Java, it allows for safer code, and offers seamless interoperability with Java. The latter allows developers to migrate their projects to Kotlin without having to rewrite the entire codebase. Such migrations are one of the reasons why we might have to work with JPA in Kotlin. Picking JPA for a fresh Kotlin application also makes sense, as it is a mature technology familiar to the developers.

There is no JPA without entities, and defining them in Kotlin comes with some caveats. Let’s look at how to avoid the common pitfalls and make the most of using Kotlin. Spoiler alert: data classes are not the best option for entity classes.

This article will be mostly focused on Hibernate as it is undoubtedly the leader among all JPA implementations.

Tips on Using DevOps Maturity Assessments to Manage Change

For many IT organizations, the digital transformation trend has spurred continuous changes in how to approach developing software systems that meet ever-evolving business needs. One of the more common efforts is the switch to Agile methods, which often segues into DevOps.

This path makes perfect sense since collaboration between development and operations teams often results in faster iterations and improvement of product features in comparison to conventional software development models.

Training NLP Engines Without All of the Answers

Natural Language Processing (NLP) or Natural Language Understanding (NLU) is a subset of Artificial Intelligence (AI). There are many benefits when using the technology, and I am surprised at the pushback from technical people when talking about deploying it. I guess there is a difference between learning about technology in academia and the complexity of actually deploying it.

So, how do we get past all the pushback when chatbots are having conversations and intelligent automation promises to be better than old-school EAI and SOA?

The Lifeline of a Vulnerability

The Vulnerability Was Generated Until It Was Found 

Again and again, we read something in the IT news about security gaps that have been found. The more severe the classification of this loophole, the more attention this information will get in the general press. Most of the time, you don't even hear or read anything about all the security holes found that are not as well known as the SolarWinds Hack, for example. But what is the typical lifeline of such a security gap?

Let's start with the birth of a vulnerability. This birth can be done in two differently motivated ways. On the one hand, it can happen to any developer that he creates a security hole by an unfortunate combination of source code pieces. On the other hand, it can also be based on targeted manipulation. However, this has essentially no effect on the further course of the lifeline of a security vulnerability. In the following, we assume that a security hole has been created and that it is now active in some software. These can be executable programs or libraries offered that are integrated into other software projects as a dependency.

CVSS: The Basics Explained

The Basic Idea of CVSS

What is the Common Vulnerability Scoring System (CVSS), who is behind it, what are we doing with it, and what does CVSS Value mean to you? I will explain how a CVSS Score is calculated, what the different elements of it mean, what the differences are between the different CVSS versions.

The basic idea behind CVSS is to provide a general classification of the severity of a security vulnerability. This is about the classification and evaluation of weak points. But, what does the abbreviation CVSS mean?

OpenTelemetry: A Way to Achieve Observability

We all understand that proper data analytics is crucial to the success of an organization. But what if your analytics can do more than help you troubleshoot current problems? Splunk is building a future where data analytics proactively solve problems before they occur. 

Data is essential to success and innovation for modern organizations. However, no commercial vendor has an effective single instrument or tool to collect data from all of an organization’s applications.

DZone Live Episode 5

Join us live today on Thursday, July 15th, at 11:00 am EDT

Join us live today for the fourth episode of DZone Live, where we bring in various DZone guests, contributors, and industry professionals from around the world. This event features a question and answers at the end.

Join us for DZone Live Episode 5 with featured guest Vishnu Vasudevan, Head of Product Engineering & Management at Opsera. They'll be on with Daniel Stori to talk about the new DZone Trend Report on CI/CD. Other guests include Alireza Chegini, Ram Ravishankar, Ryan Smith, Debasis Roy Choudhuri, and Gaurav Dhimate.

9 Things I’ve Learned About Software Development Management

Managing the software development process has been likened to herding cats. In other words, you can’t really do it, but you can sure give it the old college try. 

It’s no secret that managing the development of a software project is an imprecise science. Here are nine truisms that I’ve learned over the years that have helped me to understand the limitations of our ability to manage the strange world of software development projects.

Those “Pesky” Pull Requests are Totally Worth It

Pretty much everyone does code reviews. They’ve been around a long time. I remember back in my Borland days when the Chief Scientist would come in every morning and review all the code that had been checked into the Subversion(!) repository the previous day and send emails out to folks whose code wasn’t up to snuff. That’s old school.

Slightly less old school? Saving all the check-ins up until Friday for the Dev Leads and/or Dev Managers to review and approve. Both of these techniques leave a lot to be desired -- the main thing being a complete lack of interaction between the developer, the code, and the reviewer. 

4 Key Observability Metrics for Distributed Applications

A common architectural design pattern these days is to break up an application monolith into smaller microservices. Each microservice is then responsible for a specific aspect or feature of your app. For example, one microservice might be responsible for serving external API requests, while another might handle data fetching for your frontend. 

Designing a robust and fail-safe infrastructure in this way can be challenging; monitoring the operations of all these microservices together can be even harder. It's best not to simply rely on your application logs for an understanding of your systems' successes and errors. Setting up proper monitoring will provide you with a more complete picture, but it can be difficult to know where to start. In this post, we'll cover service areas your metrics should focus on to ensure you're not missing key insights.

Using the Specificity of :where() as a CSS Reset

I don’t know about you, but I write these three declarations many times in my CSS:

ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

You might yell at me and say I can just put those in my CSS resets. I wish I could, but I don‘t want to and I’ll tell you why in a second.

User agents set values to those properties in a list for a purpose, and that is to make lists more readable. These are the default styles in chromium browsers for a <ul> element:

ul {
  list-style-type: disc;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  padding-inline-start: 40px;
}

So, without adding any class in HTML or style in CSS, we get those for free. That‘s a nice thing and I don‘t want to lose it. But I would appreciate it if I could make the browser understand that there is very high chance I don’t want that default feature in cases where I add a class to the element.

So here is a quick solution to reset a <ul> element that has a class:

ul[class] {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

Now I don’t lose the default style except when I add a class to my <ul> element.

The problem

There is a problem with this solution. Imagine there is a list that we want to have a different list-style-type for it, like the following:

ul[class] {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.list {
  list-style-type: square;
}

This doesn’t work since ul[class] has higher specificity. That’s where our solution breaks down.

We could add more weight to the selector’s specificity:

ul.list {
  list-style-type: square; /* Specificity: 0, 1, 1 */
}

/* or */

.sidebar .list {
  list-style-type: square; /* Specificity: 0, 2, 0 */
}

If you are OK adding more weight to the selector, you are good to go. But I’m not OK with it, personally. For example, I don’t want to put the element’s name in my CSS most of the times due to a separation of concerns principle. Or, if you are following BEM methodology, problems will most certainly arise as this conflicts with it.

So what can we do?

The solution

A few months ago, I learned about some hot selectors, including :is() and :where(). One thing about these two functional pseudo selectors, is that they can change specificity, giving us the power to nullify or increase that specificity.

The key about :where() is that it always has 0 specificity. So we can get rid of our problem very easily like this:

:where(ul[class]) {
  list-style: none;
}

.list {
  list-style: square; /* Now this works like a charm! */
}

With the power of this selector, libraries can give us style with no specificity. So there would be no specificity to compete with when we as authors write CSS.

Demo

In the following demo, you can remove :where() to see what we talked about in action:


The post Using the Specificity of :where() as a CSS Reset appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.