#Search as a button

1 messages ยท Page 1 of 1 (latest)

blissful anvil
#

please post this to github :3

grand gate
#

Love this, makes the top bar feel super cramped now! I wonder if anyone knows how to remove the help and show member list icon?

tribal monolith
#

how do i match the icon color?

inland portal
#

i did not notice that it's different

tribal monolith
#

thanks. looks perfect

grand gate
#

Looks fine from here too!

plain shell
#

correct channel now

inland portal
#

yeah, sorry ๐Ÿ˜… i was wondering why i can't post image there

karmic timber
#

is there a way to do the same but opens on hover instead of clicking

inland portal
#

maybe, but you would still have to click inside the input area..

fresh cobalt
fresh cobalt
#

OH, that cool and amazing

#

you can't get cooler then that

thorny quail
#

Oooooo I've been looking for a similar snippet for so long

#

Thank you

amber jasper
# inland portal maybe, but you would still have to click inside the input area..

You have to click it normally too
I think this is really nice

wtf my old snippet was so scuffed???
new one:

[class*=toolbar_]>*>[class*=search_]:not([class*=open_],:hover) {
  &>[class*=searchBar_] {
    width: 22px;
    background: transparent;
  }

  & svg[class*=icon_] {
    transform: scale(1.4);
    color: var(--interactive-normal);
  }
}```
#

maybe add some transitions

#

(not exactly sure how to do that for this)

#

figured it out

#

but transitions dont look very good here

thorny quail
amber jasper
#

?

#

oh

#

lmao

amber jasper
#

well maximized

still basin
#

i wanted to do this myself, but nice

karmic timber
wet sentinel
wet sentinel
#

not what I had in mind but its better yeah thanks

inland portal
wet sentinel
#

I actually dont know, just a suggestion

plain shell
inland portal
#

yeah i'm trying it's working but

#

it needs a little triangle too...

#

๐Ÿ˜‚

#

just trying it for fun

inland portal
#
.search_ac353c:hover::before{
    position: absolute;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    box-sizing: border-box;
    word-wrap: break-word;
    z-index: 1002;
    top: calc(100% + 8px); 
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-normal);
    padding: 8px 12px; 
    background-color: var(--background-floating); 
    content: 'Search'; 
    box-shadow: var(--elevation-high);
}```
#

needs shadow and blur too

#

i could not apply backdrop-filter blur to this popup

inland portal
spiral dust
#

not same background color

#

i put a !important and it's fix

amber jasper
#

it works for me without a !important

#

oh wait background color

#

ig it's your theme

#

bc for me, it's the same as all the others (none)

inland portal
#

wow it's possible too to add the little triangle!

.search_ac353c:hover::after {
    width: 0;
    height: 0;
    border: 0 solid transparent;
    border-width: 5px;
    pointer-events: none;
    position: absolute;
    z-index: 1;
    top: calc(100% - 2px); 
    content: ''; 
    border-top-color: var(--background-floating);  
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-top-width: 5px;
    transform: rotate(180deg);
}```
dusky gyro
#

i like it but there is a weird border around the icon if this can be removed it will be very awsome

#

it seems on some themes the background thing isnt complete removed on some like mine the backround border isnt removed

dusky gyro
dusky gyro
amber jasper
#

what's this part for?
I don't even see a searchBarComponent class with ctrl f

#

and don't notice any difference commenting it out

#

also compacted original snippet with nesting a bit:

.searchBarComponent__8f95f{
  background: transparent;
}

.search_ac353c:not(.open_d3ab4e) {
  && > .searchBar__5a20a {
    width: 22px;
    background: transparent;
  }

  && .iconLayout__9d9a4 {
    cursor: pointer;
  }

  && .iconContainer__9f124 {
    transform: scale(1.4);
  }

  && .icon__5c8c7 {
    color: var(--interactive-normal);
  }

  &&:hover .icon__5c8c7 {
    color: var(--interactive-active);
  }
}```
keen saffron
#

goat

mint haven
# keen saffron goat

updated classes

.search_a46bef:not(.open_a46bef) > .searchBar_a46bef {
    width: 22px;
    background: transparent;
}

.search_a46bef:not(.open_a46bef) .iconLayout_effbe2 {
    cursor: pointer;
}

.search_a46bef:not(.open_a46bef) .iconContainer_effbe2 {
    transform: scale(1.4);
}

.search_a46bef:not(.open_a46bef) .icon_effbe2 {
    color: var(--interactive-normal);
}

.search_a46bef:not(.open_a46bef):hover .icon_effbe2 {
    color: var(--interactive-active);
}```
blissful anvil
mint haven
blissful anvil
#

[class*="search_"]

mint haven
#

don't they cause lag though? Once built up with more and more wildcards. It causes lag.

#

its what i heard from someone in the BD server

blissful anvil
#

Its like 9 youll survive

#

Also for future reference dont listen to anything anyone says in the bd server ever trolley

amber jasper
# mint haven updated classes ```css .search_a46bef:not(.open_a46bef) > .searchBar_a46bef { ...

cleaned up and future proof version with nesting

[class*=toolbar_]>[class*=search_]>[class*=search_]:not([class*=open_]) {
  &>[class*=searchBar_] {
    width: 22px;
    background: transparent;
  }

  & [class*=icon_] {
    cursor: pointer;

    &>[class*=iconContainer_] {
      transform: scale(1.4);

      &>svg[class*=icon_] {
        color: var(--interactive-normal);
      }

      &:hover>svg[class*=icon_] {
        color: var(--interactive-active);
      }
    }
  }

  &:hover::before {
    position: absolute;
    border-radius: 5px;
    font-weight: 500;
    font-size: 14px;
    line-height: 16px;
    box-sizing: border-box;
    word-wrap: break-word;
    z-index: 1002;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-normal);
    padding: 8px 12px;
    background-color: var(--background-floating);
    content: 'Search';
    box-shadow: var(--elevation-high);
  }

  &:hover::after {
    width: 0;
    height: 0;
    border: 0 solid transparent;
    border-width: 5px;
    pointer-events: none;
    position: absolute;
    z-index: 1;
    top: calc(100% - 1.7px);
    content: '';
    border-top-color: var(--background-floating);
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-top-width: 5px;
    transform: rotate(180deg);
  }
}```
mint haven
#

i found removing the 1.7px in the top on the ::after to have fixed it

amber jasper
mint haven
#

i think you have a theme which might have caused you to add it to there, cause it was misaligned for you.

amber jasper
sage leaf
#

bar

dusky gyro
#

when will be there an update it stopped working ?

versed rose
#

this totally broke with visual refresh

spiral dust
#

little bar in my side

mint haven
#

discord moved it to the center of the topbar.

wet pawn
#

This appears to have stopped working does anyone know how to fix it?