My FIRST devlog!!!, this one’s mostly about bugs lol. so i added the whole window dragging thing today (you can grab the little header bar and move the window around the screen) and it was way more annoying to get working than i expected.
first issue: i had centered the window using this css trick with transform: translate(-50%, -50%) which is honestly a really common way to center stuff. looked perfect… until i tried to drag it and it would snap to a weird spot the second i clicked. turns out transforms and javascript dragging do NOT get along, bc the drag script reads the element’s position using offsetTop/offsetLeft which totally ignores transforms. so the visual position and the “real” position the code thinks it’s at were just different things. had to ditch the transform centering trick and switch to plain calc() math instead. small fix, but took me actually embarrassingly long to figure out why it was glitching.
second bug, even dumber: i copy pasted a css rule for my subtitle text and forgot to actually change the values, so it was literally just a duplicate of my heading style. ended up with “currently building, currently curious” rendering huge and bold like it was trying to be the title too lmao. found it by basically just reading my own css line by line which, fun fact, is a great way to humble yourself.
also made a real decision today: kept the close button as just a plain small grey dot instead of doing the classic red circle thing most os’s use. felt like a red dot would clash with the whole minimal vibe i’m going for, even tho red = universal “close” language. tradeoff i’m fine with.
anyway it works now, you can actually drag the window around and close/reopen it, feels way more like a real little os instead of just a static page.