Skip to content

Instantly share code, notes, and snippets.

View sharjeel619's full-sized avatar
🎯
Focusing

Sharjeel Imtiaz sharjeel619

🎯
Focusing
View GitHub Profile
@sharjeel619
sharjeel619 / index.html
Created May 20, 2019 20:00
Display items in a grid using display: grid, without any media queries
<html>
<head>
<title>CSS Grid</title>
<style>
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
grid-gap: 15px;
}
.grid div {
@sharjeel619
sharjeel619 / index.css
Created May 14, 2019 22:33
Line Truncate with ellipses at the end.
/* Simple css way to truncate line with ellipses at the end. Doesn't work with IE & Firefox*/
:root {
--lines-to-show: 3;
--line-height: 18px;
--font-size: 16px;
}
.element-to-truncate {
display: block;
display: -webkit-box;
max-width: 100%;