プロジェクト

全般

プロフィール

Vote #79984

完了

Add hover styles to buttons

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
127
issue_org_id:
31204
author_id:
107353
assigned_to_id:
332
comments:
12
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Related to #31147.

Before:
!{width: 50%; border: 1px solid grey;}.before.png!

On hover there is no effect.

After:
!{width: 50%; border: 1px solid grey;}.after.png!

On hover:
!{width: 50%; border: 1px solid grey;}.after-hover.png!

Any feedback is welcome.


journals

--------------------------------------------------------------------------------
The patch looks a bit odd in my case, because it sets the font size only for the buttons but not for the other input fields.
I think it would be better to set the font-size either for all input fields or for none.
Adding a transition to the hover effect would be a nice icing on the cake. :-)

!{width: 50%; border: 1px solid grey;}.buttons-vs-input-fields.png!
--------------------------------------------------------------------------------
Bernhard Rohloff wrote:
> The patch looks a bit odd in my case, because it sets the font size only for the buttons but not for the other input fields.
> I think it would be better to set the font-size either for all input fields or for none.
> Adding a transition to the hover effect would be a nice icing on the cake. :-)

My bad, sorry for adding the font-size rule.
I've updated the patch:
- removed the font-size rule
- included a basic transition

Bernhard, please feel free to propose improvements to my patch.

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Bernhard Rohloff wrote:
> I think it would be better to set the font-size either for all input fields or for none.

I think it is a good idea to add the font-size to all input elements and remove the hardcoded height added by my patches, but I'll try to do it in the near future.

--------------------------------------------------------------------------------
I've tested you changes and I think it looks really great now. LGTM!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Thank you for the nice improvement. For me, the background color #ddd is a bit too dark. What do you think if the color is changed to #e4e4e4? This is the same color with the border color of some objects such as div.box, table.list, and fieldset.

<pre><code class="diff">
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (リビジョン 18106)
+++ public/stylesheets/application.css (作業コピー)
@@ -461,7 +461,19 @@
padding-right: 20px;
}
input[type="file"] {border: 0; padding-left: 0; padding-right: 0;}
-input[type="submit"] {-webkit-appearance: button; cursor: pointer; background-color: #fff;}
+input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+ background-color: #fff;
+ height: 28px;
+ -webkit-transition: background-color 100ms linear;
+ -moz-transition: background-color 100ms linear;
+ -o-transition: background-color 100ms linear;
+ transition: background-color 100ms linear;
+}
+input[type="submit"]:hover {
+ background-color: #e4e4e4;
+}
select[multiple=multiple] {background: #fff; padding-right: initial; height: auto;}
fieldset {border: 1px solid #e4e4e4; margin:0; min-width: inherit;}
legend {color: #333;}

</diff></pre>
--------------------------------------------------------------------------------
I'm ok with any option.

I took the '#ddd' from pagination buttons, maybe we should merge the styles in another ticket.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> I'm ok with any option.
>
> I took the '#ddd' from pagination buttons, maybe we should merge the styles in another ticket.

Thank you for the clarification. Knowing the reason, I think #ddd is appropriate now.
--------------------------------------------------------------------------------
Committed the patch. Thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,31147,Add custom styles for all fields

Admin Redmine さんが3年以上前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0