Introduction
Hi
Title Line Correct?
1... 2... 3...
My voice clear... ??
First thing first
Well, you see, those of you who have come here are definitely aware of my name because it’s displayed above as the header title. So, there’s no need for me to mention my name again, right? Especially considering the level of curiosity you’ve shown so far.
I want to have a very long conversation here. Many people think that being good means having a good appearance and feeling good both physically and spiritually. But the reality is more than just that. I’m not saying that those, who do those things aren’t good; they are, but they are in the minority.
When we say someone is a good person, what feeling does that evoke in you? For example, I consider myself a good person, and I believe that whatever I like for myself, I also like for others. And whatever I don’t like for myself, I wouldn’t want for others either. This is what i believe in and what creeds I share.
Take a moment to think about this sentence: “Do you think you are a good person?”
Got it?
Did you see?
Being a good person isn’t as straightforward as it seems.
When you have good thoughts, good words, and good actions, along with the statement above, I don’t think there’s anything left to contradict being good or to argue against it.
Now let me expand the topic a bit further.
I am a programmer, and I don’t have any extraordinary talents. I simply try and make an effort to be good at it. However, outside the monitor, I lead a vastly different life—one that most people wouldn’t understand because it’s not commonly known among different lives.
But there are those worse off than us. I hope they are doing well. As for myself, let me share a bit:
I code.
I play games.
I am currently single, although I’ve had a few relationships in the past.
The reason for my separation is quite complicated and beyond patience, but I hope wherever they are, they are doing well.
In general, I work a lot. I don’t take it easy on myself. I don’t know if what I do is good or not; it’s just my way, and I’ve gotten used to it.
I study.
I work, whether it’s rewarding or not.
I’m 27 years old, born in January.
I prefer cold weather over warmth.
My favorite colors are white and blue.
Life isn’t easy for me. I’m not unlucky, but I’m not comfortable or wealthy either.
I love gaming, coding, and mathematics. Although I’m no Einstein in math, both math and I understand each other well—we’re always in sync.
There are some title i play more than others and i will tell them later. lets continue shall we ?
Location
Well I live in Iran, Great ancient country but poor and weak recent years. I don't hate Iran at all, but don't mistake I really want to migrate out of Iran as soon as possible I think i can have a better life if i change my place if im going to tell you about Iran country nows is the time
Iran has some fucking pretty cities
- Tehran
- Mashhad
- Isfahan
- Shiraz (Perspolis Ancient)
- Kish
- North of Iran is generally pretty
- and many others ...
if you ever step in Iran be sure to check Shiraz because someone very specially is there who was GREAT KING and king of kings Cyrus
his body i mean his grave is there
Most of the time police block people
Rules of Writing
Typography
- Fonts should have
-webkit-font-smoothing: antialiased
applied for better legibility - Fonts should have
text-rendering: optimizeLegibility
applied for better legibility - Fonts should be subset based on the content, alphabet or relevant language(s)
- Font weight should not change on hover or selected state to prevent layout shift
- Font weights below 400 should not be used
- Medium sized headings generally look best with a font weight between 500-600
- Adjust values fluidly by using CSS
clamp()
, e.g.clamp(48px, 5vw, 72px)
for thefont-size
of a heading - Where available, tabular figures should be applied with
font-variant-numeric: tabular-nums
, particularly in tables or when layout shifts are undesirable, like in timers - Prevent text resizing unexpectedly in landscape mode on iOS with
-webkit-text-size-adjust: 100%
Motion
- Switching themes should not trigger transitions and animations on elements 1
- Animation duration should not be more than 200ms for interactions to feel immediate
- Animation values should be proportional to the trigger size:
- Don't animate dialog scale in from 0 → 1, fade opacity and scale from ~0.8
- Don't scale buttons on press from 1 → 0.8, but ~0.96, ~0.9, or so
- Actions that are frequent and low in novelty should avoid extraneous animations: 2
- Opening a right click menu
- Deleting or adding items from a list
- Hovering trivial buttons
- Looping animations should pause when not visible on the screen to offload CPU and GPU usage
- Use
scroll-behavior: smooth
for navigating to in-page anchors, with an appropriate offset
Touch
- Hover states should not be visible on touch press, use
@media (hover: hover)
3 - Font size for inputs should not be smaller than 16px to prevent iOS zooming on focus
- Inputs should not auto focus on touch devices as it will open the keyboard and cover the screen
- Apply
muted
andplaysinline
to<video />
tags to auto play on iOS - Disable
touch-action
for custom components that implement pan and zoom gestures to prevent interference from native behavior like zooming and scrolling - Disable the default iOS tap highlight with
-webkit-tap-highlight-color: rgba(0,0,0,0)
, but always replace it with an appropriate alternative
Optimizations
- Large
blur()
values forfilter
andbackdrop-filter
may be slow - Scaling and blurring filled rectangles will cause banding, use radial gradients instead
- Sparingly enable GPU rendering with
transform: translateZ(0)
for unperformant animations - Toggle
will-change
on unperformant scroll animations for the duration of the animation 4 - Auto-playing too many videos on iOS will choke the device, pause or even unmount off-screen videos
- Bypass React's render lifecycle with refs for real-time values that can commit to the DOM directly 5
- Detect and adapt to the hardware and network capabilities of the user's device
Accessibility
- Disabled buttons should not have tooltips, they are not accessible 6
- Box shadow should be used for focus rings, not outline which won’t respect radius 7
- Focusable elements in a sequential list should be navigable with ↑ ↓
- Focusable elements in a sequential list should be deletable with ⌘ Backspace
- To open immediately on press, dropdown menus should trigger on
mousedown
, notclick
- Use a svg favicon with a style tag that adheres to the system theme based on
prefers-color-scheme
- Icon only interactive elements should define an explicit
aria-label
- Tooltips triggered by hover should not contain interactive content
- Images should always be rendered with
<img>
for screen readers and ease of copying from the right click menu - Illustrations built with HTML should have an explicit
aria-label
instead of announcing the raw DOM tree to people using screen readers - Gradient text should unset the gradient on
::selection
state - When using nested menus, use a "prediction cone" to prevent the pointer from accidentally closing the menu when moving across other elements.
Design
- Optimistically update data locally and roll back on server error with feedback
- Authentication redirects should happen on the server before the client loads to avoid janky URL changes
- Style the document selection state with
::selection
- Display feedback relative to its trigger:
- Show a temporary inline checkmark on a successful copy, not a notification
- Highlight the relevant input(s) on form error(s)
- Empty states should prompt to create a new item, with optional templates
Footnotes
-
Switching between dark mode or light mode will trigger transitions on elements that are meant for explicit interactions like hover. We can disable transitions temporarily to prevent this. For Next.js, use next-themes which prevents transitions out of the box. ↩
-
This is a matter of taste but some interactions just feel better with no motion. For example, the native macOS right click menu only animates out, not in, due to the frequent usage of it. ↩
-
Most touch devices on press will temporarily flash the hover state, unless explicitly only defined for pointer devices with
@media (hover: hover)
. ↩ -
Use
will-change
as a last resort to improve performance. Pre-emptively throwing it on elements for better performance may have the opposite effect. ↩ -
This might be controversial but sometimes it can be beneficial to manipulate the DOM directly. For example, instead of relying on React re-rendering on every wheel event, we can track the delta in a ref and update relevant elements directly in the callback. ↩
-
Disabled buttons do not appear in tab order in the DOM so the tooltip will never be announced for keyboard users and they won't know why the button is disabled. ↩
-
As of 2023, Safari will not take the border radius of an element into account when defining custom outline styles. Safari 16.4 has added support for
outline
following the curve of border radius. However, keep in mind that not everyone updates their OS immediately. ↩