Styling inputs, and lining up multiple list items
Hi all,
Last bit of my first svelte app and I'm a happy chap!
I'm hoping the sandbox works and lets you edit, perhaps...?
Have attached a photo of the page anyway, as you can see, the list items don't really line up well and I'm trying to figure out the best way to accomplish this? Ideally I'd like all 3 parts to align right,
37 Replies
remove the
justify-content: center
from your li's
set the ul to width: fit-content
and margin-inline: auto
to center it and remove the default paddingOh fantastic, that worked, thanks Mark š
ah, so I think the reason I did the flex properties was because the X wasn't lining pu with text, how did everyone tackle that issue?
something something share your code š
Trying to style this section
the CSS code so far is
maybe this will work better?
this made things.. funky...?
the longer the text, the further out the buttons go
Hmm, alignments like that are my nemesis
likewise, it's the main hatred I have with css, I can just never align text with checks/buttons etc.
it's definitely something with align-self/items, but the text mixed with the emoji makes it complicated
this is b1's version
the wrap is a good idea
I think b1's is just a capital X, where you're using the ā emoji
see, that doesn't even line up properly on a regular line of text
true, I can just use a red X lol
I might just leave it like this and admit defeat tbh lol. just flex-start it all
How much are you willing to fight with the design? You're not a designer, right? So why not just make something like b1's: no real color, no real design, just nice and simple css and you focus on the functionality?
I feel like you try to be too fancy with the projects you make
I'm done with it tbh lol, I think that result looks perfectly passable
I just added a keydown for hitting enter on the input, I'd like an edit button and then I'm finished, I think
I do get caught up in design alot though and I hate design š
I stole my styles for the most part š
all I actually need to do is make sure it fits on mobile, then edit button, localstorage and im done
1 issue I noticed with the mobile is that the word-wrap doesn't seem to... work?
Also don't test without a word break its not really practical
š
no wordbreaks will overflow pretty much any situation
bruh
exactly that is not a practical test
use lorem
oh you mean "test like this" not "adadsadadadada"
hahahah
you could test the longest word in the language xD
interesting, it works with lorem ipsum, just not with my welsh town
word-break: break-all;
if you really wanted to break up a string without spaces
so all I need to do now is localstorage, edit button and VOILA, todo list done, 2 days (5 hours)
then this can replace the shitheap that I have on my portfolio
i want 2-3 svelte projects then i need to make my portfolio look like an adult did it, and not a 12 year old
I need to update/replace mine
I'll probably end up remaking the folio too lol (or at least a revamp š¤·āāļø )
yeah ill do mine insvelte, once I learn some transitions/animations, I'd like to add some subtle things here and there to make it stand out nicer
but for sure picking up svelte was the best decision, it's so much easier writing the functionality now.
Honestly learning Svelte will make you a better React dev (easier to learn components/lifecycles/reactivity)
to quote my mentor š
yeah I can see that. I'm just happy to not be writing vanilla js for a project fml, the pain
yea but knowing how to manipulate the dom is still valuable, frameworks just make it easier.
yep, happy i spent so much time on vanilla
dont regret it at all
OH SHIT I DID THE EDIT BUTTON