CSS Specificity

Came across this very useful tool for comparing CSS Specificity.

Specificity Calculator

This is very useful for identifying why your CSS might be overridden by competing styles in other files.

SharePoint Client – Folder and Files

If you know the relative Url of the folder within SharePoint there is a straight forward way to access the files within that folder.

using Microsoft.SharePoint.Client;
...
using (ClientContext clientContext = new ClientContext("https://something.sharepoint.com/sites/mysite/"))
{
    Folder folder = clientContext.Web.GetFolderByServerRelativeUrl("/sites/mysite/root_folder/sub_folder");

    // Load the Folder and Files into the ClientContext so we can access them
    clientContext.Load(folder);
    clientContext.Load(folder.Files);
    clientContext.ExecuteQuery();

    foreach (var item in folder.Files)
    {
        // Load each file into the ClientContext to access the file information
        context.Load(item);
        context.ExecuteQuery();
    }
}