Kode css yang berguna

Bismillaahirrohmaanirrohiim…

Berikut ini kumpulan css yang berguna, untuk mengingat saja.

Input atau button delay saat diklik (mobile)

Jika ada delay saat input atau button diklik, khususnya dimobile, bisa menggunakan kode ini:

touch-action: manipulation;

bisa dipasang di root, misal
* {
  touch-action: manipulation;
}

Block css yang dijalankan di safari atau chrome ios

/* Safari-specific fixes */
@media not all and (min-resolution: 0.001dpcm) {
	@supports (-webkit-appearance: none) {
		.form-control {
			-webkit-appearance: none;
			border-radius: 0;
		}
		
		.btn {
			-webkit-appearance: none;
		}

		/* Touch-friendly button styles untuk iOS */
		.btn {
			-webkit-tap-highlight-color: transparent;
			-webkit-touch-callout: none;
			-webkit-user-select: none;
			-khtml-user-select: none;
			-moz-user-select: none;
			-ms-user-select: none;
			user-select: none;
			min-height: 44px; /* iOS touch target minimum */
		}

	}
}

Halaman ini akan terus diupdate…

Bagikan

You May Also Like

About the Author: rasupe

Discover more from Rasupe

Subscribe now to keep reading and get access to the full archive.

Continue reading