
Język 🇵🇱 Polski
Rozpoczęcie
Stylowanie widżetu
Inne biblioteki front-end
Przewodnik po niestandardowym stylowaniu
Ten przewodnik zawiera kompletny domyślny CSS używany przez widget komentowania FastComments (v2) oraz kilka instrukcji dotyczących nadpisywania stylów.
Zrozumienie domyślnego CSS pozwala Ci na:
- Dostosować wygląd poprzez nadpisywanie konkretnych stylów
- Rozwiązywać problemy ze stylowaniem poprzez sprawdzenie, jakie klasy i selektory są dostępne
- Tworzyć własne motywy, które będą działać ze strukturą widgetu
- Korzystać z asystentów AI do generowania niestandardowych modyfikacji CSS.
Jak nadpisać style
Sposób nadpisywania stylów zależy od widgetu. Dla widgetu komentarzy musisz użyć parametru konfiguracji customCSS, aby przekazać CSS do iframe, lub określić CSS na stronie Dostosowywania w panelu administracyjnym, która będzie serwować CSS z naszego CDN.
Jak dostosować style 
Jak dostosować style widżetu komentarzy
Możesz dostosować styl widżetu komentarzy na dwa sposoby:
Opcja 1: Za pomocą parametru customCSS
Przekaż swój niestandardowy CSS jako łańcuch do parametru customCSS podczas inicjalizacji widżetu:
window.fcConfigs = [{
target: '#fastcomments-widget',
tenantId: 'your-tenant-id',
customCSS: `
.fast-comments .comment {
background-color: #f0f0f0 !important;
border-radius: 8px !important;
}
`
}];
Opcja 2: Za pomocą panelu administracyjnego
- Przejdź do strony personalizacji widżetu w panelu administracyjnym
- Przewiń do sekcji "Niestandardowy CSS" w sekcji "Zaawansowane"
- Wprowadź swój niestandardowy CSS
- Kliknij "Zapisz"
Twój niestandardowy CSS zostanie zastosowany do wszystkich widżetów komentarzy na Twojej stronie.
Wskazówki
- Użyj
!important, aby w razie potrzeby nadpisać domyślne style - Celuj w konkretne selektory, aby nie wpływać na inne części witryny
- Testuj swój CSS w różnych przeglądarkach pod kątem zgodności
- Widżet używa standardowego CSS - nie są wymagane żadne specjalne preprocesory
Dostosowywanie obramowania pola komentarza 
The border around the comment box is made of the text area's own border plus a few thin lines the widget draws around it. To change its color or corner roundness, set these CSS variables instead of styling the textarea directly. The variables restyle every part of the border at once, so the corners and colors always line up.
| Zmienna | Co zmienia | Domyślnie |
|---|---|---|
--fc-input-border-color | Kolor obramowania | #bfbfbf |
--fc-input-border-color-focus | Kolor obramowania podczas pisania przez użytkownika | #555 |
--fc-input-border-radius | Zaokrąglenie narożników | 11px |
--fc-input-border-start-start-radius | Zaokrąglenie kwadratowego lewego górnego narożnika (prawego górnego w językach od prawej do lewej) | 0 |
Add the CSS to the Custom CSS box on the Widget Customization page, or pass it with the customCSS option. You only need to set the variables you want to change.
You can also use the Comment box border helper right under the Custom CSS box, which writes this CSS for you.
Zmiana koloru obramowania

Zmiana koloru obramowania podczas pisania

Zaokrąglenie wszystkich czterech narożników
By default the top-left corner is square. Set both radius variables to round all four corners the same:

Kwadratowe narożniki

Dopasuj do swojej marki

Różne kolory w trybie ciemnym
When the widget is in dark mode it has the dark class, so you can set different values for dark mode:

Dlaczego nie stylizować pola tekstowego bezpośrednio?
The widget draws part of the comment box border itself, around the text area. If you set border-color or border-radius only on the textarea, those lines keep the default style and the border looks mismatched, for example a square line running through a rounded corner. The variables above change both at once.
Referencja niestandardowego CSS widżetu komentarzy (v2, najnowsza) 

Stylowanie widżetu ostatnich komentarzy 
The Recent Comments Widget displays a list of the most recent comments across your site or for a specific page. It includes a heading, rounded avatars, comment previews, clickable dates that deep-link to the comment, and automatic dark mode detection.
Basic Installation
Run 
Configuration Options
- tenantId (required): Your FastComments tenant ID
- urlId (optional): Filter to a single page. Leave null for all pages
- count (optional): Number of comments to show. Default is
10 - hasDarkBackground (optional): Force dark mode styling. Auto-detected from the page background if not set
Widget Structure
The widget renders with the following HTML structure:

Default CSS Reference

Customization Examples
Change Avatar Size

Show More Lines of Comment Text

Remove the Container Border

Stylowanie widżetu najczęściej dyskutowanych stron 
Widżet Najbardziej Dyskutowanych Stron wyświetla uszeregowaną listę stron z największą liczbą komentarzy. Zawiera nagłówek, numerowane pozycje, liczniki komentarzy z ikonami, daty ostatniej aktywności oraz automatyczne wykrywanie trybu ciemnego.
Podstawowa instalacja
Run 
Opcje konfiguracji
- tenantId (wymagane): Twój identyfikator tenant FastComments
- hasDarkBackground (opcjonalne): Wymusza stylizację w trybie ciemnym. Jeśli nie ustawiono, wykrywane automatycznie na podstawie tła strony
Struktura widżetu
Widżet renderuje się z następującą strukturą HTML:

Domyślny CSS widżetu (referencja)

Przykłady dostosowania
Usuń odznaki rangi

Usuń obramowanie kontenera

Stylowanie widżetu ostatnich dyskusji 
The Recent Discussions Widget displays a list of pages sorted by the most recent comment activity. It includes a heading, last activity dates, comment counts with icons, and automatic dark mode detection.
Basic Installation
Run 
Configuration Options
- tenantId (required): Twoje ID najemcy FastComments
- count (optional): Liczba stron do wyświetlenia. Domyślnie
20, maksymalnie100 - hasDarkBackground (optional): Wymusza stylizację trybu ciemnego. Automatycznie wykrywane z tła strony, jeśli nie ustawiono
Widget Structure
Widżet renderuje się z następującą strukturą HTML:

Default CSS Reference

Customization Examples
Remove the Container Border

Custom Link Color
