Comments (5)
What do you mean by removing duplicates from an array?
from 30-seconds-of-css.
Removing items from an array, especially if those items are arrays themselves.
const array = [1, 1, 1, 3, 3, 2, 2];
const unique = [...new Set(array)];
const unique = array.reduce((result, element) => {
return result.includes(element) ? result : [...result, element];
}, []);
const unique = array.filter((element, index) => {
return array.indexOf(element) === index;
});
from 30-seconds-of-css.
That's JavaScript, not CSS
from 30-seconds-of-css.
What about the other two?
from 30-seconds-of-css.
- Media Queries for Standard Devices
We have discussed this in the past, we will not be implementing this as what is considered standard devices changes quite often. Additionally, the idea of a standard device media query is somewhat outdated as developers are encouraged to develop with features in mind, instead of limiting themselves to standard device media querying.
- Lazy loading images
This one might be more suited for a blog post than anything else, as it requires some explaining and details that might not fit well in the snippet format.
- Remove duplicates from an array
JS snippet, already implemented as uniqueElements.
from 30-seconds-of-css.
Related Issues (20)
- [FEATURE] Multiline truncation HOT 2
- how to build this? HOT 19
- [BUG] Animation / Button Border Animation not clickable HOT 4
- [QUESTION] Used color scheme? HOT 2
- PWA feature HOT 3
- Chinese translation HOT 8
- Sorry, I am coming again. HOT 1
- Reinstate old UI and website link HOT 30
- [BUG] offscreen snippet links to scetchy/phising website HOT 1
- Scam site linked in one of the snippets HOT 1
- Change the selection color HOT 2
- [Enhancement] Fix typo in about section on the html page HOT 1
- A (hopefully) better Hamburger Button HOT 2
- Add side effect note for the css rules HOT 2
- The preview image in "Image Rotate on Hover" is broken. HOT 2
- Is 30-seconds-of-css not participating in Hacktoberfest? HOT 2
- CSS Neumorphic Buttons HOT 2
- CSS : Neumorphic Buttons HOT 2
- Website horizontal scroll (CSS issue) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 30-seconds-of-css.