Ticket #20579: 20579.2.diff
File 20579.2.diff, 4.2 KB (added by , 13 years ago) |
---|
-
wp-content/themes/twentyten/style.css
307 307 top: .5ex; 308 308 } 309 309 input[type="text"], 310 input[type="password"], 311 input[type="date"], 312 input[type="datetime"], 313 input[type="datetime-local"], 314 input[type="email"], 315 input[type="month"], 316 input[type="number"], 317 input[type="search"], 318 input[type="tel"], 319 input[type="time"], 320 input[type="url"], 321 input[type="week"], 310 322 textarea { 311 323 background: #f9f9f9; 312 324 border: 1px solid #ccc; … … 315 327 -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); 316 328 padding: 2px; 317 329 } 330 input[type="search"] { 331 -webkit-appearance: textfield; 332 } 333 input[type="search"]::-webkit-search-decoration { 334 display: none; 335 } 318 336 a:link { 319 337 color: #0066cc; 320 338 } -
wp-content/themes/twentyeleven/style.css
434 434 /* Forms */ 435 435 input[type=text], 436 436 input[type=password], 437 input[type=date], 438 input[type=datetime], 439 input[type=datetime-local], 440 input[type=email], 441 input[type=month], 442 input[type=number], 443 input[type=search], 444 input[type=tel], 445 input[type=time], 446 input[type=url], 447 input[type=week], 437 448 textarea { 438 449 background: #fafafa; 439 450 -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); … … 443 454 color: #888; 444 455 } 445 456 input[type=text]:focus, 457 input[type=password]:focus, 458 input[type=date]:focus, 459 input[type=datetime]:focus, 460 input[type=datetime-local]:focus, 461 input[type=email]:focus, 462 input[type=month]:focus, 463 input[type=number]:focus, 464 input[type=search]:focus, 465 input[type=tel]:focus, 466 input[type=time]:focus, 467 input[type=url]:focus, 468 input[type=week]:focus, 446 469 textarea:focus { 447 470 color: #373737; 448 471 } … … 450 473 padding-left: 3px; 451 474 width: 98%; 452 475 } 453 input[type=text] { 476 input[type=text], 477 input[type=password], 478 input[type=date], 479 input[type=datetime], 480 input[type=datetime-local], 481 input[type=email], 482 input[type=month], 483 input[type=number], 484 input[type=search], 485 input[type=tel], 486 input[type=time], 487 input[type=url], 488 input[type=week] { 454 489 padding: 3px; 455 490 } 491 input[type="search"] { 492 -webkit-appearance: textfield; 493 } 494 input[type="search"]::-webkit-search-decoration { 495 display: none; 496 } 456 497 input#s { 457 498 background: url(images/search.png) no-repeat 5px 6px; 458 499 -moz-border-radius: 2px; … … 2048 2089 width: 68.9%; 2049 2090 } 2050 2091 #respond input[type="text"], 2092 #respond input[type="email"], 2093 #respond input[type="url"], 2051 2094 #respond textarea { 2052 2095 background: #fff; 2053 2096 border: 4px solid #eee; … … 2085 2128 z-index: 1; 2086 2129 } 2087 2130 #respond input[type="text"]:focus, 2131 #respond input[type="email"]:focus, 2132 #respond input[type="url"]:focus, 2088 2133 #respond textarea:focus { 2089 2134 text-indent: 0; 2090 2135 z-index: 1; … … 2175 2220 #respond label { 2176 2221 line-height: 2.2em; 2177 2222 } 2178 #respond input[type=text] { 2223 #respond input[type=text], 2224 #respond input[type=email], 2225 #respond input[type=url] { 2179 2226 display: block; 2180 2227 height: 24px; 2181 2228 width: 75%; … … 2448 2495 top: 2.2em; 2449 2496 } 2450 2497 /* Use the available space in the smaller comment form */ 2451 #respond input[type="text"] { 2498 #respond input[type="text"], 2499 #respond input[type="email"], 2500 #respond input[type="url"] { 2452 2501 width: 95%; 2453 2502 } 2454 2503 #respond .comment-form-author .required, -
wp-content/themes/twentyeleven/functions.php
586 586 } 587 587 add_filter( 'body_class', 'twentyeleven_body_classes' ); 588 588 589 /** 590 * Changes the comment form to use HTML5 input fields for email and url. 591 * 592 * @since Twenty Eleven 1.4 593 */ 594 function twentyeleven_html5_comment_fields( $fields ) { 595 if( isset( $fields['email'] ) ) 596 $fields['email'] = str_replace( 'type="text"', 'type="email"', $fields['email'] ); 597 if( isset( $fields['url'] ) ) 598 $fields['url'] = str_replace( 'type="text"', 'type="url"', $fields['url'] ); 599 return $fields; 600 } 601 add_filter( 'comment_form_default_fields', 'twentyeleven_html5_comment_fields' ); 602