CssSortify 🎨
English | Türkçe
English
A VS Code extension that intelligently sorts CSS properties by length or alphabetically, making your stylesheets clean and organized.
✨ Features
🚀 Usage
- Open your CSS or HTML file
- Select the CSS block you want to sort (optional, entire file will be sorted if no selection)
- Use one of these shortcuts:
Ctrl+Alt+F
: Sort by length (descending)
Ctrl+Alt+A
: Sort by length (ascending)
Ctrl+Alt+Z
: Sort alphabetically (A-Z)
Ctrl+Alt+X
: Sort alphabetically (Z-A)
Ctrl+Alt+C
: Sort by category
Ctrl+Alt+Shift+C
: Sort by category with spacing
Ctrl+Alt+M
: Minify CSS and save as .min.css
Ctrl+Alt+Shift+M
: Minify CSS in-place
Ctrl+Alt+E
: Extract CSS from HTML to external file
Ctrl+Alt+I
: Convert all inline styles to classes
Ctrl+Alt+Shift+I
: Convert selected element's inline style to class
Or:
- Right-click in your CSS or HTML file
- Select your preferred option from the CssSortify submenu
📝 Example
Input:
.example {
color:red;
margin: 20px;
background-color: #fff;
padding:0;
border:1px solid rgba(0,0,0,0.1);
position:relative!important;
}
1. Sort by Length (Descending):
.example {
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative !important;
background-color: #fff;
margin: 20px;
color: red;
padding: 0;
}
2. Sort by Length (Ascending):
.example {
padding: 0;
color: red;
margin: 20px;
background-color: #fff;
position: relative !important;
border: 1px solid rgba(0, 0, 0, 0.1);
}
3. Sort Alphabetically (A-Z):
.example {
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.1);
color: red;
margin: 20px;
padding: 0;
position: relative !important;
}
4. Sort Alphabetically (Z-A):
.example {
position: relative !important;
padding: 0;
margin: 20px;
color: red;
border: 1px solid rgba(0, 0, 0, 0.1);
background-color: #fff;
}
5. Sort by Category:
.example {
margin: 20px;
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative !important;
background-color: #fff;
color: red;
}
6. Sort by Category with Spacing:
.example {
margin: 20px;
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative !important;
background-color: #fff;
color: red;
}
⚙️ Requirements
- Visual Studio Code 1.85.0 or higher
🤝 Contributing
- Fork this repository
- Create your feature branch (
git checkout -b super-feature
)
- Commit your changes (
git commit -m 'Add some super feature'
)
- Push to the branch (
git push origin super-feature
)
- Create a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Türkçe
CSS özelliklerini uzunluğa veya alfabetik sıraya göre akıllıca düzenleyen VS Code eklentisi.
✨ Özellikler
🚀 Kullanım
- CSS veya HTML dosyanızı açın
- Düzenlemek istediğiniz CSS bloğunu seçin (opsiyonel, seçim yapmazsanız tüm dosya düzenlenir)
- Aşağıdaki kısayollardan birini kullanın:
Ctrl+Alt+F
: Uzunluğa göre azalan sırada sırala
Ctrl+Alt+A
: Uzunluğa göre artan sırada sırala
Ctrl+Alt+Z
: Alfabetik sırala (A-Z)
Ctrl+Alt+X
: Alfabetik sırala (Z-A)
Ctrl+Alt+C
: Kategoriye göre sırala
Ctrl+Alt+Shift+C
: Kategoriye göre aralıklı sırala
Ctrl+Alt+M
: CSS'i sıkıştır ve .min.css olarak kaydet
Ctrl+Alt+Shift+M
: CSS'i yerinde sıkıştır
Ctrl+Alt+E
: HTML'den CSS'i harici dosyaya çıkar
Ctrl+Alt+I
: Tüm inline stilleri class'lara dönüştür
Ctrl+Alt+Shift+I
: Seçili elementin inline stilini class'a dönüştür
Ya da:
- CSS veya HTML dosyanızda sağ tıklayın
- CssSortify alt menüsünden istediğiniz seçeneği seçin
📝 Örnek
Girdi:
.example {
color:red;
margin: 20px;
background-color: #fff;
padding:0;
border:1px solid rgba(0,0,0,0.1);
position:relative!important;
}
1. Uzunluğa Göre (Azalan):
.example {
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative !important;
background-color: #fff;
margin: 20px;
color: red;
padding: 0;
}
2. Uzunluğa Göre (Artan):
.example {
padding: 0;
color: red;
margin: 20px;
background-color: #fff;
position: relative !important;
border: 1px solid rgba(0, 0, 0, 0.1);
}
3. Alfabetik (A-Z):
.example {
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.1);
color: red;
margin: 20px;
padding: 0;
position: relative !important;
}
4. Alfabetik (Z-A):
.example {
position: relative !important;
padding: 0;
margin: 20px;
color: red;
border: 1px solid rgba(0, 0, 0, 0.1);
background-color: #fff;
}
5. Kategoriye Göre:
.example {
margin: 20px;
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
position: relative !important;
background-color: #fff;
color: red;
}
6. Kategoriye Göre Aralıklı:
.example {
/* Kutu Modeli */
margin: 20px;
padding: 0;
border: 1px solid rgba(0, 0, 0, 0.1);
/* Konumlandırma */
position: relative !important;
/* Görsel/Renk */
background-color: #fff;
color: red;
}
⚙️ Gereksinimler
- Visual Studio Code 1.85.0 veya üstü
🤝 Katkıda Bulunma
- Bu depoyu fork edin
- Feature branch'inizi oluşturun (
git checkout -b super-feature
)
- Değişikliklerinizi commit edin (
git commit -m 'Süper özellik eklendi'
)
- Branch'inizi push edin (
git push origin super-feature
)
- Pull Request oluşturun
📄 Lisans
Bu proje MIT lisansı altında lisanslanmıştır. Daha fazla bilgi için LICENSE dosyasına bakın.