timroesner / WeMart

🛒 Online grocery shopping portal. Created as part of the course CmpE 133 during spring 2018.
https://wemart-133.herokuapp.com
GNU General Public License v3.0
19 stars 10 forks source link

Add to Cart button needs max width (ItemCard.js) #36

Closed timroesner closed 6 years ago

timroesner commented 6 years ago

As expected the button should shrink with the ItemCard component, however it should not exceed the maximum width of the cell. Here is a picture to clarify:

screen shot 2018-04-16 at 6 31 29 pm
timroesner commented 6 years ago

The on sale badge also seems to be affected

juancstlm commented 6 years ago

@timroesner What is the widest we realistically need the item card to be? No more than 160?

timroesner commented 6 years ago

So since we only have four items right now the button is quite large. This is how it looks with four items, button width is at 216px:

screen shot 2018-04-16 at 10 46 35 pm
juancstlm commented 6 years ago

Closing. Issue fixed in 2e6da5b

timroesner commented 6 years ago

Just to double check 16rem is 256px right?

juancstlm commented 6 years ago

the way I understood it was that 16rem with some css trickery was 160px.

So if the root html element is set to

html {
  font-size: 62.5%;
}

then rem of n is actually 10x n

but without that it would be 256px instead of 160px