MediaWiki:Gadget-GrAnnotations.css: Difference between revisions
No edit summary |
No edit summary |
||
| (27 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
* gr_annotations.css — grantha.io inline Notes + Bookmarks + Feedback (v3) | * gr_annotations.css — grantha.io inline Notes + Bookmarks + Feedback (v3) | ||
*/ | */ | ||
/* ══════════════════════════════════════════════════════════════════ | /* ══════════════════════════════════════════════════════════════════ | ||
| Line 29: | Line 11: | ||
display: none; | display: none; | ||
flex-direction: row; | flex-direction: row; | ||
background: # | background: #B14A2E !important; | ||
border: none !important; | border: none !important; | ||
border-radius: 12px !important; | border-radius: 12px !important; | ||
| Line 35: | Line 17: | ||
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08) !important; | box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08) !important; | ||
gap: 20px !important; | gap: 20px !important; | ||
} | } | ||
#gra-fab.gra-fab-visible { display: flex; } | #gra-fab.gra-fab-visible { display: flex; } | ||
.gra-fab-btn { | .gra-fab-btn { | ||
height: 48px; | |||
height: | width: 48px; | ||
border: none; | border: none; | ||
background: transparent; | background: transparent; | ||
| Line 57: | Line 37: | ||
font-family: 'Noto Sans Devanagari'; | font-family: 'Noto Sans Devanagari'; | ||
font-weight: 400; | font-weight: 400; | ||
font-size: | font-size: 10px; | ||
line-height: 100%; | line-height: 100%; | ||
letter-spacing: 0%; | letter-spacing: 0%; | ||
color: #ffffff; | color: #ffffff; | ||
padding: | padding: 5px 0; | ||
} | |||
.gra-fab-btn:hover { | |||
background: rgba(255, 255, 255, 0.12) !important; border-radius: 12px; | |||
} | } | ||
.gra-fab-btn:hover .gra-fab-tooltip { opacity: 1; transform: translateX(0) translateY(-50%); } | .gra-fab-btn:hover .gra-fab-tooltip { opacity: 1; transform: translateX(0) translateY(-50%); } | ||
| Line 160: | Line 142: | ||
.gra-tab .gra-icon { width: 16px; height: 16px; opacity: 0.5; } | .gra-tab .gra-icon { width: 16px; height: 16px; opacity: 0.5; } | ||
.gra-tab:hover { color: #333; } | .gra-tab:hover { color: #333; } | ||
.gra-tab.gra-tab-active { color: # | .gra-tab.gra-tab-active { color: #B14A2E; border-bottom-color: #B14A2E; } | ||
.gra-tab.gra-tab-active .gra-icon { | .gra-tab.gra-tab-active .gra-icon { | ||
opacity: 1; | opacity: 1; | ||
filter: invert( | filter: invert(33%) sepia(52%) saturate(1104%) hue-rotate(333deg) brightness(93%) contrast(90%);} | ||
} | |||
#gra-panel-body { | #gra-panel-body { | ||
| Line 198: | Line 179: | ||
} | } | ||
.gra-composer.gra-composer-visible { display: flex; } | .gra-composer.gra-composer-visible { display: flex; } | ||
/* Feedback composer header row */ | /* Feedback composer header row */ | ||
| Line 207: | Line 193: | ||
.gra-composer-header strong { | .gra-composer-header strong { | ||
flex: 1; | flex: 1; | ||
font- | font-weight: 600; | ||
color: # | color: #1C1A17; | ||
font-size: 16px; | |||
font-family: "Noto Sans Devanagari" | |||
} | } | ||
.gra-btn-x { | .gra-btn-x { | ||
| Line 326: | Line 314: | ||
} | } | ||
.gra-composer-input::placeholder { color: #aaa; } | .gra-composer-input::placeholder { color: #aaa; } | ||
.gra-composer-input:focus { border-color: # | .gra-composer-input:focus { border-color: #B14A2E; } | ||
.gra-composer-actions { | .gra-composer-actions { | ||
| Line 339: | Line 327: | ||
cursor: pointer; | cursor: pointer; | ||
color: #5f6368; | color: #5f6368; | ||
font-size: | font-size: 14px; | ||
font-family: | font-family:"Noto Sans Devanagari"; | ||
font-weight: 500; | font-weight: 500; | ||
padding: | padding: 8px 12px; | ||
border-radius: 4px; | border-radius: 4px; | ||
} | } | ||
.gra-btn-cancel:hover { background: #f5f5f5; } | .gra-btn-cancel:hover { background: #f5f5f5; } | ||
.gra-btn-submit { | .gra-btn-submit { | ||
background: | background: transparent; | ||
color: # | color: #B14A2E; | ||
border: none; | border: none; | ||
cursor: pointer; | cursor: pointer; | ||
font-size: | font-size: 14px; | ||
font-family: | font-family:"Noto Sans Devanagari"; | ||
font-weight: 500; | font-weight: 500; | ||
padding: | padding: 8px 12px; | ||
border-radius: 4px; | border-radius: 4px; | ||
gap: 8px; | |||
transition: background 0.15s; | transition: background 0.15s; | ||
} | } | ||
.gra-btn-submit:hover { | .gra-btn-submit:hover { color: #8A351F; } | ||
.gra-btn-submit:disabled { | .gra-btn-submit:disabled { opacity: 0.4; | ||
cursor: not-allowed; } | |||
/* ── Note cards ── */ | /* ── Note cards ── */ | ||
| Line 490: | Line 480: | ||
.gra-bm-composer.gra-composer-visible { display: flex; } | .gra-bm-composer.gra-composer-visible { display: flex; } | ||
.gra-bm-composer-label { | .gra-bm-composer-label { | ||
color: #1C1A17; | |||
color: # | font-size: 16px; | ||
font-size: | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: 8px; | gap: 8px; | ||
} | |||
.gra-bm-composer-label .gra-icon, .gra-composer-header .gra-icon, .gra-tab .gra-icon, .gra-note-card .gra-icon, .gra-bookmark-card .gra-icon {filter: brightness(0) saturate(100%) invert(7%) sepia(8%) saturate(894%) hue-rotate(357deg) brightness(97%) contrast(92%); | |||
} | } | ||
| Line 767: | Line 758: | ||
.gra-mob-dismiss span[style] { | .gra-mob-dismiss span[style] { | ||
color: rgba(255,255,255,0.70) !important; | color: rgba(255,255,255,0.70) !important; | ||
} | |||
@media (max-width: 767px) { | |||
/* Bottom sheet — pinned to bottom via inset, animated via transform */ | |||
#gra-fb-composer.gra-composer, | |||
#gra-nt-composer.gra-composer, | |||
#gra-bm-composer.gra-bm-composer { | |||
position: fixed !important; | |||
inset: auto 0 0 0 !important; /* top:auto right:0 bottom:0 left:0 */ | |||
width: 100% !important; | |||
max-width: 100% !important; | |||
margin: 0 !important; | |||
border-radius: 16px 16px 0 0 !important; | |||
box-shadow: 0 -4px 24px rgba(0,0,0,0.18) !important; | |||
padding: 20px 20px calc(20px + env(safe-area-inset-bottom)) !important; | |||
box-sizing: border-box !important; | |||
transform: translateY(100%) !important; | |||
transition: transform 0.28s cubic-bezier(0.32,0.72,0,1) !important; | |||
z-index: 10600 !important; | |||
} | |||
/* Slide up when visible */ | |||
#gra-fb-composer.gra-composer-visible, | |||
#gra-nt-composer.gra-composer-visible, | |||
#gra-bm-composer.gra-composer-visible { | |||
transform: translateY(0) !important; | |||
} | |||
/* Grab handle */ | |||
#gra-fb-composer::before, | |||
#gra-nt-composer::before, | |||
#gra-bm-composer::before { | |||
content: ""; | |||
display: block; | |||
width: 36px; height: 4px; | |||
border-radius: 2px; | |||
background: #d0d0d0; | |||
margin: -6px auto 14px; | |||
} | |||
.gra-composer .gra-composer-input, | |||
.gra-bm-composer .gra-composer-input { | |||
font-size: 16px !important; /* no iOS zoom on focus */ | |||
} | |||
.gra-composer-actions { display: flex; gap: 10px; } | |||
.gra-composer-actions .gra-btn-submit, | |||
.gra-composer-actions .gra-btn-cancel { flex: 1; min-height: 44px; } | |||
} | |||
@media (max-width: 767px) { | |||
/* Docked toolbar below the reader header */ | |||
#gra-fab.gra-fab-mobile-docked { | |||
position: fixed !important; | |||
top: var(--gr-toc-top, 99px) !important; /* sits just below reader toolbar */ | |||
left: 0 !important; | |||
right: 0 !important; | |||
height: 52px !important; | |||
flex-direction: row !important; | |||
align-items: center !important; | |||
justify-content: space-around !important; | |||
border-radius: 0 !important; | |||
box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important; | |||
z-index: 2147483646 !important; /* below native menu, above content */ | |||
} | |||
#gra-fab.gra-fab-mobile-docked .gra-fab-btn { | |||
flex: 1; | |||
flex-direction: column; | |||
height: 44px; | |||
background: transparent !important; | |||
touch-action: manipulation; | |||
-webkit-tap-highlight-color: transparent; | |||
} | |||
#gra-fab.gra-fab-mobile-docked .gra-fab-btn-label { | |||
display: block; | |||
font-size: 10px; | |||
margin-top: 2px; | |||
} | |||
} | } | ||