1
A
回答
0
我建立了一些超越CSS這一點。如果該網站有深色主題背景,請將「黑暗」類添加到主體中,否則將是較輕的主題。
我用rgba顏色(黑色或白色)替換了任何十六進制顏色,所以桌子在任何背景顏色下看起來都不錯。還對菜單和按鈕進行了一些改進。您應該將sass變量$ builder-highlight-color設置爲某個值,或者將其替換爲您想要的任何行所選的顏色。
這裏是應該放在原始UI網格CSS之後的覆蓋CSS。備註
.ui-grid-header {border-bottom: none}
.ui-grid-top-panel {background: rgba(0,0,0,0.1)}
.dark .ui-grid-top-panel {background: rgba(255,255,255,0.1)}
.ui-grid-row:nth-child(odd) .ui-grid-cell {background-color: transparent}
.ui-grid-row:nth-child(odd):hover .ui-grid-cell {background-color: rgba(0,0,0,0.03)}
.dark .ui-grid-row:nth-child(odd):hover .ui-grid-cell {background-color: rgba(255,255,255,0.03)}
.ui-grid-row:nth-child(even) .ui-grid-cell {background-color: rgba(0,0,0,0.07)}
.dark .ui-grid-row:nth-child(even) .ui-grid-cell {background-color: rgba(255,255,255,0.07)}
.dark .ui-grid-row:nth-child(even):hover .ui-grid-cell {background-color: rgba(255,255,255,0.1)}
.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child {border-right-color: rgba(0,0,0,0.2)}
.dark .ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child {border-right-color: rgba(255,255,255,0.2)}
.ui-grid-cell {border-color: rgba(0,0,0,0.2)}
.dark .ui-grid-cell {border-color: rgba(255,255,255,0.2)}
.ui-grid-header-cell {border-color: rgba(0,0,0,0.2)}
.dark .ui-grid-header-cell {border-color: rgba(255,255,255,0.2)}
.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child {border-right-color: rgba(0,0,0,0.2)}
.dark .ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child {border-right-color: rgba(255,255,255,0.2)}
.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell {border-bottom-color: rgba(0,0,0,0.2)}
.dark .ui-grid-row .ui-grid-cell.ui-grid-row-header-cell {border-bottom-color: rgba(255,255,255,0.2)}
input[type="text"].ui-grid-filter-input {border-color: rgba(0,0,0,0.2); border-radius: 3px;}
.dark input[type="text"].ui-grid-filter-input {border-color: rgba(255,255,255,0.2); background-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9)}
.dark input[type="text"].ui-grid-filter-input::placeholder {color: rgba(255,255,255,0.35)}
.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid,
.ui-grid-menu .ui-grid-menu-inner {border: none; padding-bottom: 10px;}
.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child)>button {border-bottom: none}
.ui-grid-menu-button:hover {border-color: rgba(0,0,0,0.1); background-color: rgba(0,0,0,0.07);}
.dark .ui-grid-menu-button:hover {border-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.07);}
.ui-grid-menu .ui-grid-menu-inner {background: rgb(255,255,255)}
.dark .ui-grid-menu .ui-grid-menu-inner {background: rgb(0,0,0)}
.ui-grid-grid-footer {padding: 5px; background-color: rgba(0,0,0,0.08); border-top: solid 1px rgba(0,0,0,0.2);}
.ui-grid-footer-info {height: auto !important; color: rgba(0,0,0,0.5)}
.dark .ui-grid-grid-footer {background-color: rgba(255,255,255,0.4); border-top: solid 1px rgba(255,255,255,0.7)}
.dark .ui-grid-footer-info {color: rgba(255,255,255,0.5)}
[data-table-responsive] > .grid {
height: auto !important
}
.grid {min-height: 0px; color: rgba(0,0,0,0.85)}
.dark .grid {color: rgba(255,255,255,0.85)}
.ui-grid-render-container-body,
.ui-grid-render-container {background-color: transparent}
.ui-grid-row-selected.ui-grid-row:nth-child(odd) .ui-grid-cell,
.ui-grid-row-selected.ui-grid-row:nth-child(even) .ui-grid-cell {
color: #fff;
background-color: $builder-highlight-color;
}
.ui-grid-row-selected.ui-grid-row:nth-child(odd) .ui-grid-cell.ui-grid-cell-focus,
.ui-grid-row-selected.ui-grid-row:nth-child(even) .ui-grid-cell.ui-grid-cell-focus {
outline: 0;
background-color: $builder-highlight-color;
}
.ui-grid-row-selected.ui-grid-row:nth-child(odd):hover .ui-grid-cell,
.ui-grid-row-selected.ui-grid-row:nth-child(even):hover .ui-grid-cell {
color: #fff;
background-color: $builder-highlight-color !important;
}
.ui-grid {
position: absolute;
height: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.noHide .ui-grid-icon-angle-down {display: none}
.ui-grid-filter-container {padding: 4px 5px;}
input[type="text"].ui-grid-filter-input {
padding: 3px 0 3px 3px;
font-weight: normal;
}
.ui-grid {border: none;}
.ui-grid-row {cursor: pointer}
.ui-grid-row:nth-child(odd):hover .ui-grid-cell {background-color: #f2f9ff; cursor: pointer}
.ui-grid-row:nth-child(even):hover .ui-grid-cell {background-color: #f2f9ff; cursor: pointer}
.ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell {
pointer-events: auto;
}
.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid {
-webkit-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.6);
-moz-box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.6);
box-shadow: 3px 3px 5px 0px rgba(0,0,0,0.6);
max-height: 1000px;
}
.ui-grid-menu-button .ui-grid-icon-cancel {opacity: 0.3;}
.ui-grid-menu-button .ui-grid-icon-ok {color: green;}
.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid li button {
font-size: 11px;
padding: 5px 10px;
}
.ui-grid-menu-button {
border-radius: 2px;
border-color: transparent;
background-color: transparent;
}
.ui-grid-menu-button .ui-grid-icon-container {
margin-top: 0;
}
.ui-grid-menu-close-button {display: none !important}
[class^="ui-grid-icon"]:before, [class*=" ui-grid-icon"]:before {
margin-right: 0;
}
.ui-grid-menu-button > div {
padding: 5px 3px 5px 5px;
}
相關問題
- 1. angular-ui-grid - no gridTestUtils.spec.js
- 2. Angular UI Grid編輯
- 3. AngularJS + RequireJS + angular-ui-grid
- 4. Angular UI Grid中的Angular UI Grid附加選擇列
- 5. Angular UI-Grid支持BootStrap Popover?
- 6. 如何下載Angular UI Grid?
- 7. 在Angular-UI-grid中enableCellEditing
- 8. Angular Formly ui-grid和columnDefs
- 9. Angular Ui Grid導入數據
- 10. Ng-grid與ui-grid
- 11. angular-ui-grid嵌套在angular-ui-layout中,高度爲100%
- 12. Angular js Grid
- 13. Angular UI-Grid的圖釘圖標
- 14. 禁用Angular UI Grid列菜單動畫
- 15. Angular UI Grid不顯示數據
- 16. 在Angular Ui-Grid headerCellTemplate中添加Bootstrap DateRangePicker
- 17. 展開Angular-ui-grid中的特定行
- 18. Angular ui-grid不適用於ngDialog
- 19. Angular UI-grid有多少行可見?
- 20. 沒有收到Angular UI Grid回調
- 21. 在Angular UI ng-grid中關閉滾動?
- 22. Angular UI Grid多列可同時編輯
- 23. Angular ng-grid/ui-grid在視圖內實現視圖邏輯
- 24. 類似於ng-grid的Angular js ui-grid中有showGroupPanel選項嗎?
- 25. ui-grid enableFiltering events
- 26. Kendo UI Grid Grid模板
- 27. kendo UI Grid Grid Timespan過濾
- 28. Kendo UI Grid Grid模板
- 29. ag-grid vs slick-grid vs angular-grid哪個更好?
- 30. EditableCellTemplate ui-grid