luchoster / react-ig

React Component to scrape and display Instagram Posts based on Username or hashtag
https://react-ig.netlify.app/
0 stars 1 forks source link

request: ship package with no styling #4

Open will-t-harris opened 4 years ago

will-t-harris commented 4 years ago

Would it be possible to ship this without the included .scss files?

I'm attempting to style the component's output on a site I'm working on, and the package css is proving difficult to override.

luchoster commented 4 years ago

This is is all the css for the component.

You should be okay, just overriding those classes on your project. But if you have any ideas of something more universal that could benefit everyone, let me know and we can work something out.

.ig-posts {
     padding-top: 100px;
     padding-bottom: 100px;
}
 .ig-posts__grid {
     justify-content: start;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
     grid-gap: 0;
     width: auto;
     margin: 0;
}
 .ig-posts__grid .wrapper {
     border: 1px solid white;
     color: #fff;
     cursor: pointer;
     flex: 1 0 22rem;
     height: 100%;
     position: relative;
}
 .ig-posts__grid .wrapper img {
     width: 100%;
     height: 100%;
     object-fit: cover;
}
 .ig-posts__grid .wrapper .info {
     display: none;
     transition: all 5s ease;
}
 .ig-posts__grid .wrapper:hover .info {
     align-items: center;
     background-color: rgba(0, 0, 0, 0.3);
     color: #fff;
     display: flex;
     height: 100%;
     justify-content: center;
     position: absolute;
     top: 0;
     transition: all 5s ease;
     width: 100%;
}
 .ig-posts__grid .wrapper:hover .info .favorite {
     margin-right: 2.2rem;
}
 .ig-posts__grid .wrapper:hover .info .text {
     display: inline-block;
     font-size: 1.7rem;
     font-weight: 600;
     color: white;
     padding-left: 5px;
}
will-t-harris commented 4 years ago

I made some progress overriding the CSS that ships with the package.

I'm trying to think of a way to structure things so that the defaults are as generic as possible, as most uses of a component like this will have different styling needs depending on the project.

I'll get back to you if I can think of anything.