|
1 | 1 | /* this contains override styles for buttons and related elements */
|
2 | 2 |
|
| 3 | +/* these styles changed the Fomantic UI's rules, Fomantic UI expects only "basic" buttons have borders */ |
3 | 4 | .ui.button,
|
4 | 5 | .ui.button:focus {
|
5 | 6 | background: var(--color-button);
|
@@ -52,26 +53,29 @@ a.btn:hover {
|
52 | 53 | color: inherit;
|
53 | 54 | }
|
54 | 55 |
|
55 |
| -/* other button styles */ |
| 56 | +/* By default, Fomantic UI doesn't support "bordered" buttons group, but Gitea would like to use it. |
| 57 | +And the default buttons always have borders now (not the same as Fomantic UI's default buttons, see above). |
| 58 | +It needs some tricks to tweak the left/right borders with active state */ |
56 | 59 |
|
57 |
| -.ui.buttons .button:first-child { |
58 |
| - border-left: 1px solid var(--color-light-border); |
| 60 | +.ui.buttons .button { |
| 61 | + border-right: none; |
59 | 62 | }
|
60 | 63 |
|
61 |
| -.ui.buttons .button:first-child:has(+ .button.active) { |
62 |
| - border-right: none !important; |
| 64 | +.ui.buttons .button:first-child { |
| 65 | + border-left: 1px solid var(--color-light-border); |
63 | 66 | }
|
64 | 67 |
|
65 |
| -.ui.buttons .button + .button:not(.active) { |
66 |
| - border-left: none; |
| 68 | +.ui.buttons .button:last-child { |
| 69 | + border-right: 1px solid var(--color-light-border); |
67 | 70 | }
|
68 | 71 |
|
69 |
| -.two-toggle-buttons .button:not(.active):first-of-type { |
70 |
| - border-right: none; |
| 72 | +.ui.buttons .button.active { |
| 73 | + border-left: 1px solid var(--color-light-border); |
| 74 | + border-right: 1px solid var(--color-light-border); |
71 | 75 | }
|
72 | 76 |
|
73 |
| -.two-toggle-buttons .button.active:last-of-type { |
74 |
| - border-left: 1px solid var(--color-light-border); |
| 77 | +.ui.buttons .button.active + .button { |
| 78 | + border-left: none; |
75 | 79 | }
|
76 | 80 |
|
77 | 81 | .ui.labeled.button.disabled > .button,
|
|
0 commit comments