css import not working
Answered
Munchkin posted this in #help-forum
MunchkinOP
Hi, Im trying to import an icon library for my webpage but when i try to call on said library i dont get anything.
any help is appreciated
@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/remove.css');"use client";
export default function Searchbar({ onValueChange }) {
const handleInputChange = (e) => {
onValueChange(e);
};
return (
<div className="">
<input
className="text-[black]"
type="text"
placeholder="Search..."
onChange={(e) => handleInputChange(e.target.value)}
/>
<span className="gg-remove">Test</span>
</div>
);
}any help is appreciated
15 Replies
MunchkinOP
Btw if you click on the impot link. it shows:
.gg-remove {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs,1));
width: 22px;
height: 22px;
border: 2px solid;
border-radius: 22px
}
.gg-remove::before {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 10px;
height: 2px;
background: currentColor;
border-radius: 5px;
top: 8px;
left: 4px
}@Munchkin Hi, Im trying to import an icon library for my webpage but when i try to call on said library i dont get anything.
css
@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://unpkg.com/css.gg@2.0.0/icons/css/remove.css');
jsx
"use client";
export default function Searchbar({ onValueChange }) {
const handleInputChange = (e) => {
onValueChange(e);
};
return (
<div className="">
<input
className="text-[black]"
type="text"
placeholder="Search..."
onChange={(e) => handleInputChange(e.target.value)}
/>
<span className="gg-remove">Test</span>
</div>
);
}
any help is appreciated
I also tried importing directly using css, which doesn't work. you should follow specific instructions to use it on nextjs
@Anay-208 I also tried importing directly using css, which doesn't work. you should follow specific instructions to use it on nextjs
MunchkinOP
do you have a link for that?
1 min, I'll try it for myself
I'll update you within 2 hours
MunchkinOP
take your time taking a break 🙂
MunchkinOP
Yes
just move the
@import url to the topAnswer
above
@tailwind baseit should work
MunchkinOP
ah!
Mark my message as a solution
MunchkinOP
Will do
Thanks